Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit 25ee051

Browse files
committed
split default.nix into shell.nix and default.nix
1 parent 9902135 commit 25ee051

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

default.nix

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
{ pypi2nix ? { outPath = ./.; name = "pypi2nix"; }
2-
, nixpkgs ? builtins.fetchTarball "https://github.com/NixOS/nixpkgs-channels/archive/77f8f35d57618c1ba456d968524f2fb2c3448295.tar.gz"
3-
4-
, pythonVersion ? "27"
1+
{ stdenv, fetchurl, python, zip, makeWrapper
2+
, src ? { outPath = ./.; name = "pypi2nix"; }
53
}:
64

75
let
8-
9-
pkgs = import nixpkgs {};
10-
python = (builtins.getAttr "python${pythonVersion}Packages" pkgs).python;
116
deps = import ./src/pypi2nix/deps.nix { inherit fetchurl; };
12-
13-
inherit (pkgs) fetchurl;
14-
inherit (pkgs.stdenv) mkDerivation;
15-
16-
in mkDerivation rec {
177
version = builtins.readFile ./VERSION;
8+
in stdenv.mkDerivation rec {
189
name = "pypi2nix-${version}";
19-
srcs = with deps; [ pypi2nix pip click setuptools zcbuildout zcrecipeegg ];
20-
buildInputs = with pkgs; [ pythonFull zip makeWrapper ];
10+
srcs = with deps; [ src pip click setuptools zcbuildout zcrecipeegg ];
11+
buildInputs = [ python zip makeWrapper ];
2112
sourceRoot = ".";
2213

2314
postUnpack = ''

shell.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{ src ? { outPath = ./.; name = "pypi2nix"; }
2+
, nixpkgs ? builtins.fetchTarball "https://github.com/NixOS/nixpkgs-channels/archive/77f8f35d57618c1ba456d968524f2fb2c3448295.tar.gz"
3+
4+
, pythonVersion ? "27"
5+
}:
6+
7+
let
8+
pkgs = import nixpkgs {};
9+
python = (builtins.getAttr "python${pythonVersion}Packages" pkgs).python;
10+
in import ./default.nix {
11+
inherit src python;
12+
inherit (pkgs) stdenv fetchurl zip makeWrapper;
13+
}

0 commit comments

Comments
 (0)