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

35 lines
520 B
Nix
Raw Normal View History

2025-03-15 12:53:27 +01:00
{
pkgs ,
stdenv ,
} :
with pkgs ;
with stdenv ;
mkDerivation {
pname = "nix-store-fuzzy-find" ;
version = "2025-03-09" ;
dontUnpack = true ;
dontPatch = true ;
dontConfigure = true ;
dontBuild = true ;
installPhase = ''
runHook preInstall
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/*
runHook postInstall
'' ;
}