forked from python-acoustics/python-acoustics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.nix
44 lines (34 loc) · 1000 Bytes
/
release.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ nixpkgs ? (fetchTarball "channel:nixos-20.03")
}:
with nixpkgs;
let
# Create an sdist given a derivation.
# Should add an sdist and wheel output to buildPythonPackage
create-sdist = drv:
drv.overridePythonAttrs(oldAttrs: with oldAttrs; rec {
name = "${pname}-${version}-sdist";
postBuild = ''
rm -rf dist
${drv.pythonModule.interpreter} nix_run_setup sdist
'';
installPhase = ''
mkdir -p $out
mv dist/*.tar.gz $out/
'';
fixupPhase = "true";
doCheck = false;
propagatedBuildInputs = [];
});
overrides = self: super: {
acoustics = super.callPackage ./default.nix {
development = true;
};
};
overlay = self: super: {
python36 = super.python36.override{packageOverrides=overrides;};
python37 = super.python37.override{packageOverrides=overrides;};
python38 = super.python38.override{packageOverrides=overrides;};
};
in import nixpkgs {
overlays = [ overlay ];
}