4 ms·
I can't tell if you're joking, but I'm not sure how these results told you anything. I find nix-index and nix-locate entirely unusable.
by peter_l_downs 4y ago
I can't tell if you're joking, but I'm not sure how these results told you anything. I find nix-index and nix-locate entirely unusable.
- aidenn0 4y agoNot joking, I just scan through the first column. If you want to not have to do so, adding -1 cleans it up: $ nix-locate --top-level -1 --regex '^/bin/python3' qtile.out python3Minimal.out python311.out python38.out python37.out python3Full.out python38Full.out sourcehut.python.out python39Full.out python39.out python37Full.out ihaskell.out Also things like "python3" and "gcc" and such are going to show way more hits than, for example, "firefox": $ nix-locate --top-level -1 --regex '^/bin/firefox' firefox-esr-102-unwrapped.out firefox_decrypt.out firefox-unwrapped.out firefox.out
- aidenn0 4y agoHere, I made a short shell script to show all the results with package descriptions (requires enabling the "nix" command): #!/bin/sh results="$(nix-locate -1 --regex --top-level "^/bin/${1}\$")" for item in $results; do nix search "nixpkgs#${item%.*}" done Example: $ ./nix-find-executable.sh python3 * legacyPackages.x86_64-linux.qtile (0.22.1) A small, flexible, scriptable tiling window manager written in Python * legacyPackages.x86_64-linux.python3Minimal (3.10.8) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python311 (3.11.1) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python38 (3.8.16) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python37 (3.7.16) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python3Full (3.10.8) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python38Full (3.8.16) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.sourcehut.python (3.10.8) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python39Full (3.9.15) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python39 (3.9.15) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.python37Full (3.7.16) A high-level dynamically-typed programming language * legacyPackages.x86_64-linux.ihaskell