Linux commands in Nixos

Could someone explain me how to use dumb Linux commands in Nixos, for example strings? I even can not find it in pkg repo.

strings is provided, among others, by binutils and busybox. You can use something like nix-locate to find packages providing it:

❯ nix-locate --top-level -w bin/strings
toybox.out                                            0 s /nix/store/0zqlkmgccih433ivv0mkypak1nw19bs3-toybox-0.8.10/bin/strings
[…]
busybox.out                                           0 s /nix/store/67z6w2mjmz2dpg7p84891bfwhip91gh4-busybox-1.36.1/bin/strings
bintools.out                                          0 s /nix/store/hzxzisypgf5r20x6h9lbykn71l3r3pnx-binutils-wrapper-2.41/bin/strings
[…]
2 Likes

thank you, on their github page they propose to use nix run command, sorry for stupid question, I am noob in Nixos, how I can translate installation in flake.nix? I tried this

  # Nix-locate
    nix-locate.url = "github:nix-community/nix-index";
    nix-locate.inputs.nixpkgs-unstable.follows = "nixpkgs-unstable";

but I guess it is wrong, as it does not work.

thank you in advance!

You can use this: GitHub - nix-community/nix-index-database: Weekly updated nix-index database [maintainer=@Mic92]

3 Likes