Skip to content

Instantly share code, notes, and snippets.

@telent
Created August 22, 2017 23:31
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 telent/f16941d83c7d73f8c93d2584a3d75314 to your computer and use it in GitHub Desktop.
Save telent/f16941d83c7d73f8c93d2584a3d75314 to your computer and use it in GitHub Desktop.
# something along these lines. we add preConfigure so that python
# doesn't choke with some error about "not a valid wheel file name"
# and we override postInstall not to create the docbook manual
# because it failed and it was easier to do that than fix it
nixopsMaster = lib.overrideDerivation pkgs.nixops (a: rec {
version = "1.6pre1_1675d7a";
name = "nixops-${version}";
# as of this date, no released version of nixops supports
# writing /etc/hosts with the libvirtd backend
src = fetchFromGitHub {
owner = "NixOS";
repo = "nixops";
rev = "1675d7a";
sha256 = "1fly6ry7ksj7v5rl27jg5mnxdbjwn40kk47gplyvslpvijk65m4q";
};
preConfigure = ''
for i in scripts/nixops setup.py doc/manual/manual.xml; do
substituteInPlace $i --subst-var-by version ${version}
done
'';
postInstall = ''
mkdir -p $out/share/nix/nixops
cp -av "nix/"* $out/share/nix/nixops
wrapProgram $out/bin/nixops --prefix PATH : "${openssh}/bin"
'';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment