2025-03-15 12:53:27 +01:00
|
|
|
{
|
|
|
|
pkgs ,
|
|
|
|
stdenv ,
|
|
|
|
} :
|
|
|
|
|
|
|
|
with pkgs ;
|
|
|
|
with stdenv ;
|
|
|
|
|
|
|
|
mkDerivation {
|
|
|
|
pname = "nix-store-fuzzy-find" ;
|
|
|
|
version = "2025-03-09" ;
|
|
|
|
|
2025-03-15 13:34:31 +01:00
|
|
|
phases = [ "installPhase" ] ;
|
2025-03-15 12:53:27 +01:00
|
|
|
|
|
|
|
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/*
|
|
|
|
'' ;
|
|
|
|
}
|