nix-packages/packages/nix-store-fuzzy-find/package.nix

27 lines
421 B
Nix

{
pkgs ,
stdenv ,
} :
with pkgs ;
with stdenv ;
mkDerivation {
pname = "nix-store-fuzzy-find" ;
version = "2025-03-09" ;
phases = [ "installPhase" ] ;
installPhase = ''
mkdir -p $out/bin
cat <<- EOF > $out/bin/nix-store-fuzzy-find
#!${bash}/bin/sh
exec ${findutils}/bin/find /nix/store -maxdepth 1 -type d -name "*-\$1-*"
EOF
# TODO: Check if Nix does this for us
chmod +x $out/bin/*
'' ;
}