Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milahu/deb2nix
translate package names between debian and nixpkgs
https://github.com/milahu/deb2nix
apt apt-file debian debian2nixos lang2nix nix nix-index nix-locate nixos nixpkgs
Last synced: 26 days ago
JSON representation
translate package names between debian and nixpkgs
- Host: GitHub
- URL: https://github.com/milahu/deb2nix
- Owner: milahu
- License: mit
- Created: 2024-01-03T13:20:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-09T05:41:07.000Z (3 months ago)
- Last Synced: 2024-09-28T09:03:49.586Z (about 1 month ago)
- Topics: apt, apt-file, debian, debian2nixos, lang2nix, nix, nix-index, nix-locate, nixos, nixpkgs
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# deb2nix
translate package names between debian and nixpkgs
## status
early draft, proof of concept
currently this is extremely slow
because `nix-locate` is called once for every fileexample:
```console
$ APT_CONFIG="$HOME/.config/apt/apt.conf" apt-file list bzip2 | grep /bin/
bzip2: /bin/bunzip2
bzip2: /bin/bzcat
bzip2: /bin/bzcmp
bzip2: /bin/bzdiff
bzip2: /bin/bzegrep
bzip2: /bin/bzexe
bzip2: /bin/bzfgrep
bzip2: /bin/bzgrep
bzip2: /bin/bzip2
bzip2: /bin/bzip2recover
bzip2: /bin/bzless
bzip2: /bin/bzmore
```this will call
```sh
nix-locate --top-level --whole-name --at-root /bin/bunzip2
nix-locate --top-level --whole-name --at-root /bin/bzcat
nix-locate --top-level --whole-name --at-root /bin/bzcmp
# ...
```this will be faster:
```sh
nix-locate --top-level --regex '^(/bin/bunzip2|/bin/bzcat|/bin/bzcmp|/bin/bzdiff|/bin/bzegrep|/bin/bzexe|/bin/bzfgrep|/bin/bzgrep|/bin/bzip2|/bin/bzip2recover|/bin/bzless|/bin/bzmore)$'
```## related
- https://github.com/ngi-nix/debnix - Mapping library names from debian to nix - mapping is done by package names, see [matcher.rs](https://github.com/ngi-nix/debnix/blob/main/src/matcher.rs)