File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
3- stdenv ,
43 buildGoModule ,
54 fetchFromGitHub ,
65 installShellFiles ,
7- buildPackages ,
86 coreutils ,
97 nix-update-script ,
108 nixosTests ,
@@ -45,21 +43,14 @@ buildGoModule (finalAttrs: {
4543 "-X=github.com/sagernet/sing-box/constant.Version=${ finalAttrs . version } "
4644 ] ;
4745
48- postInstall =
49- let
50- emulator = stdenv . hostPlatform . emulator buildPackages ;
51- in
52- ''
53- installShellCompletion --cmd sing-box \
54- --bash <(${ emulator } $out/bin/sing-box completion bash) \
55- --fish <(${ emulator } $out/bin/sing-box completion fish) \
56- --zsh <(${ emulator } $out/bin/sing-box completion zsh )
46+ postInstall = ''
47+ installShellCompletion release/completions/sing-box.{bash,fish,zsh}
5748
58- substituteInPlace release/config/sing-box{,@}.service \
59- --replace-fail "/usr/bin/sing-box" "$out/bin/sing-box" \
60- --replace-fail "/bin/kill" "${ coreutils } /bin/kill"
61- install -Dm444 -t "$out/lib/systemd/system/" release/config/sing-box{,@}.service
62- '' ;
49+ substituteInPlace release/config/sing-box{,@}.service \
50+ --replace-fail "/usr/bin/sing-box" "$out/bin/sing-box" \
51+ --replace-fail "/bin/kill" "${ coreutils } /bin/kill"
52+ install -Dm444 -t "$out/lib/systemd/system/" release/config/sing-box{,@}.service
53+ '' ;
6354
6455 passthru = {
6556 updateScript = nix-update-script { } ;
You can’t perform that action at this time.
0 commit comments