Skip to content

Commit

Permalink
WIP: Fix nix-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoura committed Apr 15, 2021
1 parent 71f17e9 commit 63afc30
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
12 changes: 12 additions & 0 deletions nix/cardano-clusterlib.nix
@@ -0,0 +1,12 @@
{ stdenv, buildPythonPackage, fetchPypi, setuptools_scm }:

buildPythonPackage rec {
pname = "cardano-clusterlib";
version = "0.1.10";
src = fetchPypi {
inherit pname version;
sha256 = "1ggvff8ygj2q2p59m31bxpgn5a3y0i1j1b5nzcs5k4annd2si4qs";
};
doCheck = false;
nativeBuildInputs = [ setuptools_scm ];
}
12 changes: 6 additions & 6 deletions nix/sources.json
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://cardano.org",
"owner": "input-output-hk",
"repo": "cardano-node",
"rev": "30fcd1929f6c25bc7ab10a6267e23506b913719c",
"sha256": "1xbjqlc8idzmndfqb2yk8b70qzhsh676p4bli8m2wzyjv0y1046i",
"rev": "186c04efb30b0aa42a048dc15835ab05a7db3b53",
"sha256": "0r5lpm6sfqc402ll1wpwpnza8z5d87s7cqn36i372dq1bc86gyii",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-node/archive/30fcd1929f6c25bc7ab10a6267e23506b913719c.tar.gz",
"url": "https://github.com/input-output-hk/cardano-node/archive/186c04efb30b0aa42a048dc15835ab05a7db3b53.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
Expand All @@ -17,10 +17,10 @@
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f8962fd92ed4c1afeb6badbddc57002f53cc4a8f",
"sha256": "1wbibzscdvr9j9qldyya5wh7hsydxpvq12jfm0nq44w5y654vh25",
"rev": "62ec3db0174a454280e369fee98818ada0de607e",
"sha256": "169h41mknn8r7mizwnnnfpvnxrg8l74kfy8s6jz07y1rrw5yhmdr",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/f8962fd92ed4c1afeb6badbddc57002f53cc4a8f.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/62ec3db0174a454280e369fee98818ada0de607e.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
21 changes: 18 additions & 3 deletions shell.nix
@@ -1,5 +1,7 @@
{
cardanoNodePkgs ? import ((import ./nix/sources.nix {}).cardano-node + "/nix") {}
sourcesNix ? import ./nix/sources.nix {}
, cardanoNodePkgs ? import (sourcesNix.cardano-node + "/nix") {}
, cardanoNodeShell ? import (sourcesNix.cardano-node + "/shell.nix") {}
}:

let
Expand All @@ -9,23 +11,36 @@ let
packageOverrides = self: _: {
allure = self.callPackage ./nix/allure.nix {};
pytest-allure = self.callPackage ./nix/pytest-allure.nix {};
cardano-clusterlib = self.callPackage ./nix/cardano-clusterlib.nix {};
_hypothesis = self.hypothesis.overridePythonAttrs(old: rec {
version = "6.8.8";
doCheck = false;
src = super.fetchFromGitHub {
owner = "HypothesisWorks";
repo = "hypothesis-python";
rev = "hypothesis-python-${version}";
sha256 = "1y2aamla2qd4sz0alsbj740bpkq203v4malbvzci2k134g5dmvcq";
};
});
};
};
});

shell = cardanoNodePkgs.cardanoNodeShell.devops.overrideAttrs (oldAttrs: rec {
shell = cardanoNodeShell.devops.overrideAttrs (oldAttrs: rec {
buildInputs = oldAttrs.buildInputs ++ [ pkgs.git (pkgs.python3.withPackages (ps: with ps; [
pytest
allure
cardano-clusterlib
pytest-allure
pytest-html
pytest-ordering
pytest_xdist
setuptools
filelock
pydantic
pylint
mypy
hypothesis
_hypothesis
cbor2
requests
])) ];
Expand Down

0 comments on commit 63afc30

Please sign in to comment.