linux-utils/packages/nix-store-fuzzy-find/package.nix
Reinout Meliesie 99885b2be2
Use conventional Nix formatting
Also always end comments with a full stop, and bump package versions.
2026-04-29 16:09:15 +02:00

30 lines
580 B
Nix

{ pkgs, stdenv }:
with pkgs;
with stdenv;
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
'';
}