diff --git a/pkgs/tools/package-management/nixops/default.nix b/pkgs/tools/package-management/nixops/default.nix index 12e1989525d..4388cbc5b3d 100644 --- a/pkgs/tools/package-management/nixops/default.nix +++ b/pkgs/tools/package-management/nixops/default.nix @@ -1,43 +1,9 @@ -{ lib, pythonPackages, fetchurl, libxslt, docbook5_xsl, openssh }: - -pythonPackages.buildPythonPackage rec { - name = "nixops-1.3"; - namePrefix = ""; +{ callPackage, fetchurl }: +callPackage ./generic.nix (rec { + version = "1.3"; src = fetchurl { - url = "http://nixos.org/releases/nixops/${name}/${name}.tar.bz2"; + url = "http://nixos.org/releases/nixops/nixops/nixops-${version}.tar.bz2"; sha256 = "d80b0fe3bb31bb84a8545f9ea804ec8137172c8df44f03326ed7639e5a4bad55"; }; - - buildInputs = [ libxslt ]; - - pythonPath = - [ pythonPackages.prettytable - pythonPackages.boto - pythonPackages.sqlite3 - pythonPackages.hetzner - pythonPackages.libcloud - ]; - - doCheck = false; - - postInstall = - '' - make -C doc/manual install nixops.1 docbookxsl=${docbook5_xsl}/xml/xsl/docbook \ - docdir=$out/share/doc/nixops mandir=$out/share/man - - mkdir -p $out/share/nix/nixops - cp -av "nix/"* $out/share/nix/nixops - - # Add openssh to nixops' PATH. On some platforms, e.g. CentOS and RHEL - # the version of openssh is causing errors when have big networks (40+) - wrapProgram $out/bin/nixops --prefix PATH : "${openssh}/bin" - ''; - - meta = { - homepage = https://github.com/NixOS/nixops; - description = "NixOS cloud provisioning and deployment tool"; - maintainers = [ lib.maintainers.eelco lib.maintainers.rob ]; - platforms = lib.platforms.unix; - }; -} +}) diff --git a/pkgs/tools/package-management/nixops/generic.nix b/pkgs/tools/package-management/nixops/generic.nix new file mode 100644 index 00000000000..b9b9eee8d16 --- /dev/null +++ b/pkgs/tools/package-management/nixops/generic.nix @@ -0,0 +1,43 @@ +{ lib, pythonPackages, fetchurl, libxslt, docbook5_xsl, openssh +# version args +, src, version +}: + +pythonPackages.buildPythonPackage { + name = "nixops-${version}"; + namePrefix = ""; + + src = src; + + buildInputs = [ libxslt ]; + + pythonPath = + [ pythonPackages.prettytable + pythonPackages.boto + pythonPackages.sqlite3 + pythonPackages.hetzner + pythonPackages.libcloud + ]; + + doCheck = false; + + postInstall = + '' + make -C doc/manual install nixops.1 docbookxsl=${docbook5_xsl}/xml/xsl/docbook \ + docdir=$out/share/doc/nixops mandir=$out/share/man + + mkdir -p $out/share/nix/nixops + cp -av "nix/"* $out/share/nix/nixops + + # Add openssh to nixops' PATH. On some platforms, e.g. CentOS and RHEL + # the version of openssh is causing errors when have big networks (40+) + wrapProgram $out/bin/nixops --prefix PATH : "${openssh}/bin" + ''; + + meta = { + homepage = https://github.com/NixOS/nixops; + description = "NixOS cloud provisioning and deployment tool"; + maintainers = [ lib.maintainers.eelco lib.maintainers.rob ]; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/tools/package-management/nixops/unstable.nix b/pkgs/tools/package-management/nixops/unstable.nix new file mode 100644 index 00000000000..40d56518b3d --- /dev/null +++ b/pkgs/tools/package-management/nixops/unstable.nix @@ -0,0 +1,9 @@ +{ callPackage, fetchurl }: + +callPackage ./generic.nix (rec { + version = "2015-12-18"; + src = fetchurl { + url = "http://hydra.nixos.org/build/29118371/download/2/nixops-1.3.1pre1673_a0d5681.tar.bz2"; + sha256 = "177lnlfz32crcc0gjmh1gn5y2xs142kmb4b68k4raxcxxw118kw9"; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d0d2f211548..c8781b13329 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15407,7 +15407,7 @@ let nixops = callPackage ../tools/package-management/nixops { }; - nixopsUnstable = nixops; + nixopsUnstable = callPackage ../tools/package-management/nixops/unstable.nix { }; nixui = callPackage ../tools/package-management/nixui { node_webkit = nwjs_0_12; };