linux-utils/packages/nix-store-fuzzy-find/package.nix
Reinout Meliesie 6d0534b319
wUse stdenvNoCC where appropriate
Which at present means in all packages.
2026-04-29 16:14:59 +02:00

30 lines
588 B
Nix

{ pkgs, stdenvNoCC }:
with pkgs;
with stdenvNoCC;
mkDerivation {
pname = "nix-store-fuzzy-find";
version = "2026-04-29";
phases = [ "createSourcesPhase" "installPhase" ];
createSourcesPhase = ''
# Same directory structure that `unpackPhase` would use.
mkdir -p /build/source
cat <<- EOF > /build/source/nix-store-fuzzy-find
#!${bash}/bin/sh
exec ${findutils}/bin/find /nix/store -maxdepth 1 -type d -name "*-\$1-*"
EOF
'';
installPhase = ''
mkdir -p $out/bin
cp /build/source/nix-store-fuzzy-find $out/bin/
chmod +x $out/bin/nix-store-fuzzy-find
'';
}