diff --git a/packages/packages.nix b/packages/packages.nix index db24227..d8ab905 100644 --- a/packages/packages.nix +++ b/packages/packages.nix @@ -27,4 +27,6 @@ in minio-console = pkgs.callPackage ./servers/minio-console { }; privatevoid-smart-card-ca-bundle = pkgs.callPackage ./data/privatevoid-smart-card-certificate-authority-bundle.nix { }; + + sips = pkgs.callPackage ./servers/sips { }; } diff --git a/packages/servers/sips/default.nix b/packages/servers/sips/default.nix new file mode 100644 index 0000000..0ba8021 --- /dev/null +++ b/packages/servers/sips/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "sips"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "DeedleFake"; + repo = pname; + rev = "v${version}"; + sha256 = "0v5g4zz7j6150yk7k3svh3ffgr0ghzp5yl01bpq99i0lkpliidpx"; + }; + + vendorSha256 = "sha256-JZ8wtfu+jLikTKjYt+1Zt05jNVahEyRU/ciK2n+AACc="; + + subPackages = [ "cmd/sips" "cmd/sipsctl" ]; + + # HACK: this can't cross-compile + postInstall = '' + mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions + $out/bin/sipsctl completion bash > $out/share/bash-completion/completions/sipsctl + $out/bin/sipsctl completion zsh > $out/share/zsh/site-functions/_sipsctl + ''; + + meta = with lib; { + description = "A Simple IPFS Pinning Service"; + homepage = "https://github.com/DeedleFake/sips"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; +}