Skip to content

Commit

Permalink
nixpart: Move out of python-packages.nix
Browse files Browse the repository at this point in the history
The reason why it was in python-packages.nix is because we needed to
have a way to run this with different Python versions and also that the
project's API could be used by another program or library.

This is not intended so far and even if we're going to do that, we can
still move it back into python-packages.nix.

This now should make it easier to override the arguments of the package
and also should be easier to install inside a user env via "nix-env -iA
nixpart" instead of "nix-env -iA python3Packages.nixpart".

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
  • Loading branch information
aszlig committed Dec 27, 2016
1 parent ccbee46 commit e17bb61
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions nixos/tests/storage.nix
Expand Up @@ -216,8 +216,7 @@ in {

machine = { config, pkgs, ... }: {
environment.systemPackages = [
pkgs.pythonPackages.nixpart
pkgs.file pkgs.btrfs-progs pkgs.xfsprogs pkgs.lvm2
pkgs.nixpart pkgs.file pkgs.btrfs-progs pkgs.xfsprogs pkgs.lvm2
];
virtualisation.emptyDiskImages = [ 4096 4096 ];
};
Expand Down
6 changes: 3 additions & 3 deletions pkgs/tools/filesystems/nixpart/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, buildPythonApplication, blivet }:
{ stdenv, fetchurl, python3Packages }:

buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
name = "nixpart-${version}";
version = "1.0.0";

Expand All @@ -9,7 +9,7 @@ buildPythonApplication rec {
sha256 = "0avwd8p47xy9cydlbjxk8pj8q75zyl68gw2w6fnkk78dcb1a3swp";
};

propagatedBuildInputs = [ blivet ];
propagatedBuildInputs = [ python3Packages.blivet ];

meta = {
description = "NixOS storage manager/partitioner";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -2981,6 +2981,8 @@ in

nixbot = callPackage ../tools/misc/nixbot {};

nixpart = callPackage ../tools/filesystems/nixpart {};

nkf = callPackage ../tools/text/nkf {};

nlopt = callPackage ../development/libraries/nlopt {};
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -236,8 +236,6 @@ in {
inherit python;
};

nixpart = callPackage ../tools/filesystems/nixpart { };

# This is used for NixOps to make sure we won't break it with the next major
# version of nixpart.
nixpart0 = callPackage ../tools/filesystems/nixpart/0.4 { };
Expand Down

0 comments on commit e17bb61

Please sign in to comment.