nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 54 lines 1.4 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6 nix-update-script, 7}: 8 9buildGoModule (finalAttrs: { 10 pname = "dsearch"; 11 version = "0.1.1"; 12 13 src = fetchFromGitHub { 14 owner = "AvengeMedia"; 15 repo = "danksearch"; 16 tag = "v${finalAttrs.version}"; 17 hash = "sha256-gU349UQcr6Cl23tPt1yHD7EcWM8Uw6HZmbeVXyLwGj0="; 18 }; 19 20 vendorHash = "sha256-UGKcwrYQ+S1oC8lJ1EagU1Okfz/2ruj4bn/7APC2FWg="; 21 22 ldflags = [ 23 "-w" 24 "-s" 25 "-X main.Version=${finalAttrs.version}" 26 ]; 27 28 nativeBuildInputs = [ installShellFiles ]; 29 30 postInstall = '' 31 install -Dm744 ./assets/dsearch.service $out/lib/systemd/user/dsearch.service 32 substituteInPlace $out/lib/systemd/user/dsearch.service \ 33 --replace-fail /usr/local/bin/dsearch $out/bin/dsearch 34 35 installShellCompletion --cmd dsearch \ 36 --bash <($out/bin/dsearch completion bash) \ 37 --fish <($out/bin/dsearch completion fish) \ 38 --zsh <($out/bin/dsearch completion zsh) 39 ''; 40 41 passthru = { 42 updateScript = nix-update-script { }; 43 }; 44 45 meta = { 46 description = "Fast, configurable filesystem search with fuzzy matching"; 47 homepage = "https://github.com/AvengeMedia/danksearch"; 48 changelog = "https://github.com/AvengeMedia/danksearch/releases/tag/v${finalAttrs.version}"; 49 license = lib.licenses.mit; 50 teams = [ lib.teams.danklinux ]; 51 mainProgram = "dsearch"; 52 platforms = lib.platforms.unix; 53 }; 54})