Add nix-store-fuzzy-find package

This commit is contained in:
Reinout Meliesie 2025-03-15 12:53:27 +01:00
parent c38526e1a4
commit a4a4937cb9
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
2 changed files with 38 additions and 0 deletions

View file

@ -20,6 +20,10 @@ with pkgs ;
import packages/journalctl-last-invocation/package.nix import packages/journalctl-last-invocation/package.nix
) {} ; ) {} ;
nix-store-fuzzy-find = callPackage (
import packages/nix-store-fuzzy-find/package.nix
) {} ;
python = { python = {
bw-file-resubmit = callPackage ( bw-file-resubmit = callPackage (

View file

@ -0,0 +1,34 @@
{
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
'' ;
}