Skip to content

Instantly share code, notes, and snippets.

@cole-h

cole-h/zrepl.nix Secret

Created January 29, 2021 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cole-h/cb69506459bfdfe37cbc642a71014f1f to your computer and use it in GitHub Desktop.
Save cole-h/cb69506459bfdfe37cbc642a71014f1f to your computer and use it in GitHub Desktop.
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "zrepl";
version = "0.3.1";
src = fetchFromGitHub {
owner = "zrepl";
repo = "zrepl";
rev = "v${version}";
sha256 = "sha256-wtUL8GGSJxn9yEdyTWKtkHODfxxLOxojNPlPLRjI9xo=";
};
vendorSha256 = "sha256-4LBX0bD8qirFaFkV52QFU50lEW4eae6iObIa5fFT/wA=";
subPackages = [ "." ];
postInstall = ''
mkdir -p $out/etc/systemd/system
substitute dist/systemd/zrepl.service $out/etc/systemd/system/zrepl.service \
--replace /usr/local/bin/zrepl $out/bin/zrepl
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment