From 3f5549f10af2c7494a59202adb7ca35058a69216 Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Thu, 30 Jan 2020 14:13:43 -0600 Subject: [PATCH 1/7] prints --- dev/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/default.nix b/dev/default.nix index f9a53d1..d9c0082 100644 --- a/dev/default.nix +++ b/dev/default.nix @@ -163,6 +163,7 @@ pkgs // rec { ]; shellHook = '' # path for NRM dev experimentation + echo "FOO" export PYNRMSO=${ builtins.toPath ../. }/.build/build/x86_64-linux/ghc-8.6.5/hsnrm-1.0.0/x/pynrm.so/build/pynrm.so/pynrm.so @@ -187,6 +188,7 @@ pkgs // rec { cp $NIXFILE_LIB/default.nix dev/pkgs/hnrm/lib.nix cp $NIXFILE_BIN/default.nix dev/pkgs/hnrm/bin.nix chmod +rw hsnrm/hsnrm.cabal dev/pkgs/hnrm/bin.nix dev/pkgs/hnrm/lib.nix dev/pkgs/hnrm/bin.cabal dev/pkgs/hnrm/lib.cabal + echo "BAR" ''; LC_ALL = "en_US.UTF-8"; LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; -- GitLab From 0c2fb0c4e28dc2655325a8e90d2cdc0193dc525e Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Thu, 30 Jan 2020 14:32:55 -0600 Subject: [PATCH 2/7] fix the missing store path issu --- dev/default.nix | 6 ++++-- dev/haskell-overlay.nix | 7 +++++-- dev/pkgs/hnrm/bin.nix | 4 ++-- dev/pkgs/hnrm/lib.nix | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dev/default.nix b/dev/default.nix index d9c0082..2e819b7 100644 --- a/dev/default.nix +++ b/dev/default.nix @@ -147,11 +147,13 @@ pkgs // rec { NIXFILE_LIB = (haskellPackages.haskellSrc2nix { name = "hsnrm"; src = patchedSrc (src + "/hsnrm") cabalFileLib; + extraCabal2nixOptions = "--extra-arguments src"; }); NIXFILE_BIN = (haskellPackages.haskellSrc2nix { name = "hsnrm"; src = patchedSrc (src + "/hsnrm") cabalFileBin; + extraCabal2nixOptions = "--extra-arguments src"; }); inputsFrom = with pkgs; [ pynrm-hack hsnrm-hack libnrm-hack ]; buildInputs = [ @@ -163,7 +165,6 @@ pkgs // rec { ]; shellHook = '' # path for NRM dev experimentation - echo "FOO" export PYNRMSO=${ builtins.toPath ../. }/.build/build/x86_64-linux/ghc-8.6.5/hsnrm-1.0.0/x/pynrm.so/build/pynrm.so/pynrm.so @@ -188,7 +189,8 @@ pkgs // rec { cp $NIXFILE_LIB/default.nix dev/pkgs/hnrm/lib.nix cp $NIXFILE_BIN/default.nix dev/pkgs/hnrm/bin.nix chmod +rw hsnrm/hsnrm.cabal dev/pkgs/hnrm/bin.nix dev/pkgs/hnrm/lib.nix dev/pkgs/hnrm/bin.cabal dev/pkgs/hnrm/lib.cabal - echo "BAR" + sed -i 's/src = .*/inherit src;/' dev/pkgs/hnrm/lib.nix + sed -i 's/src = .*/inherit src;/' dev/pkgs/hnrm/bin.nix ''; LC_ALL = "en_US.UTF-8"; LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive"; diff --git a/dev/haskell-overlay.nix b/dev/haskell-overlay.nix index 4de718c..99e0065 100644 --- a/dev/haskell-overlay.nix +++ b/dev/haskell-overlay.nix @@ -9,14 +9,17 @@ let regex = doJailbreak super.regex; json-schema = unbreak (doJailbreak super.json-schema); zeromq4-conduit = unbreak (dontCheck super.zeromq4-conduit); - nrmlib = (self.callPackage (./pkgs/hnrm/lib.nix) { }).overrideAttrs (o: { + nrmlib = (self.callPackage (./pkgs/hnrm/lib.nix) { src = src + "/hsnrm"; + }).overrideAttrs (o: { + configurePhase = '' cp ${./pkgs/hnrm/lib.cabal} hsnrm.cabal '' + o.configurePhase; }); - nrmbin = (self.callPackage (./pkgs/hnrm/bin.nix) { }).overrideAttrs (o: { + nrmbin = (self.callPackage (./pkgs/hnrm/bin.nix) { src = src + "/hsnrm"; + }).overrideAttrs (o: { configurePhase = '' cp ${./pkgs/hnrm/bin.cabal} hsnrm.cabal '' + o.configurePhase; diff --git a/dev/pkgs/hnrm/bin.nix b/dev/pkgs/hnrm/bin.nix index 9a25a9a..27bfaa6 100644 --- a/dev/pkgs/hnrm/bin.nix +++ b/dev/pkgs/hnrm/bin.nix @@ -1,10 +1,10 @@ { mkDerivation, base, enclosed-exceptions, glpk, nrmlib, protolude -, stdenv +, src, stdenv }: mkDerivation { pname = "hsnrm"; version = "1.0.0"; - src = /nix/store/55xqhvgkgqx63plzl71qlf7cly3kl2lb-patchedSrc; + inherit src; isLibrary = false; isExecutable = true; executableHaskellDepends = [ diff --git a/dev/pkgs/hnrm/lib.nix b/dev/pkgs/hnrm/lib.nix index b58d30e..d4fda98 100644 --- a/dev/pkgs/hnrm/lib.nix +++ b/dev/pkgs/hnrm/lib.nix @@ -6,7 +6,7 @@ , hxt-xpath, intervals, json-schema, lens, MonadRandom, mtl , mtl-compat, neat-interpolation, optparse-applicative , pretty-simple, prettyprinter, protolude, random -, recursion-schemes, refined, regex, resourcet, stdenv +, recursion-schemes, refined, regex, resourcet, src, stdenv , storable-endian, template-haskell, text, transformers , typed-process, units, units-defs, unix, unordered-containers , uuid, vcs-revision, vector, yaml, zeromq4-conduit @@ -15,7 +15,7 @@ mkDerivation { pname = "nrmlib"; version = "1.0.0"; - src = /nix/store/zw0kd2hnmhfghd44jqxqmhhka31jfqvs-patchedSrc; + inherit src; libraryHaskellDepends = [ aeson aeson-extra aeson-pretty async base binary brick bytestring conduit conduit-extra containers data-default data-msgpack dhall -- GitLab From a85281e7c0403de6aa7df8fc6d491142e40423c3 Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Thu, 30 Jan 2020 14:34:21 -0600 Subject: [PATCH 3/7] fix path --- dev/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/default.nix b/dev/default.nix index 2e819b7..db1878c 100644 --- a/dev/default.nix +++ b/dev/default.nix @@ -75,7 +75,7 @@ pkgs // rec { pynrm = pkgs.callPackage ./pkgs/pynrm { inherit resources; pythonPackages = python37Packages; - src = src + "../pynrm"; + src = src + "/pynrm"; hsnrm = haskellPackages.nrmbin; }; -- GitLab From db55208d6403ab91a3af5de307540e4bf7c9443d Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Thu, 30 Jan 2020 14:37:05 -0600 Subject: [PATCH 4/7] fix libnrm source path --- dev/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/default.nix b/dev/default.nix index db1878c..784091d 100644 --- a/dev/default.nix +++ b/dev/default.nix @@ -68,7 +68,7 @@ pkgs // rec { libnrm = pkgs.callPackage ./pkgs/libnrm { inherit resources; - src = src + "../libnrm"; + src = src + "/libnrm"; hsnrm = haskellPackages.nrmbin; }; -- GitLab From c2ece95a30623f6eb328a79d5446db75c0e13254 Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Thu, 30 Jan 2020 14:42:53 -0600 Subject: [PATCH 5/7] store ->serve --- build.sh | 2 +- install.sh | 2 +- shake.sh | 2 +- shell.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 4b368c9..508c98f 100755 --- a/build.sh +++ b/build.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -nix-build -A nrm --option extra-substituters http://129.114.24.212/store --option trusted-public-keys example-nix-cache-1:HSwzbJmGDidTrax3Lvx1vMSvto04VN2O5cjfXAG9uz0= +nix-build -A nrm --option extra-substituters http://129.114.24.212/serve --option trusted-public-keys example-nix-cache-1:HSwzbJmGDidTrax3Lvx1vMSvto04VN2O5cjfXAG9uz0= diff --git a/install.sh b/install.sh index 50b22ba..dfdbe62 100755 --- a/install.sh +++ b/install.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -nix-env -f. -iA nrm --option extra-substituters http://129.114.24.212/store --option trusted-public-keys example-nix-cache-1:HSwzbJmGDidTrax3Lvx1vMSvto04VN2O5cjfXAG9uz0= +nix-env -f. -iA nrm --option extra-substituters http://129.114.24.212/serve --option trusted-public-keys example-nix-cache-1:HSwzbJmGDidTrax3Lvx1vMSvto04VN2O5cjfXAG9uz0= diff --git a/shake.sh b/shake.sh index 8e23eae..6928ee5 100755 --- a/shake.sh +++ b/shake.sh @@ -6,7 +6,7 @@ if [ -z "$IN_NIX_SHELL" ] then nix-shell \ --run "runhaskell dev/shake.hs $*" \ - --option extra-substituters http://129.114.24.212/store \ + --option extra-substituters http://129.114.24.212/serve \ --option trusted-public-keys example-nix-cache-1:HSwzbJmGDidTrax3Lvx1vMSvto04VN2O5cjfXAG9uz0= else runhaskell dev/shake.hs $* diff --git a/shell.sh b/shell.sh index 41dd6f4..968771b 100755 --- a/shell.sh +++ b/shell.sh @@ -1,2 +1,2 @@ #!/usr/bin/env bash -nix-shell --option extra-substituters http://129.114.24.212/store --option trusted-public-keys example-nix-cache-1:HSwzbJmGDidTrax3Lvx1vMSvto04VN2O5cjfXAG9uz0= +nix-shell --option extra-substituters http://129.114.24.212/serve/ --option trusted-public-keys example-nix-cache-1:HSwzbJmGDidTrax3Lvx1vMSvto04VN2O5cjfXAG9uz0= -- GitLab From 426d2c1553f50c60222a9aa888e25170d513aa8e Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Thu, 30 Jan 2020 14:52:29 -0600 Subject: [PATCH 6/7] minor test removal --- dev/default.nix | 15 +++++++++++---- dev/python-overlay.nix | 6 ++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/dev/default.nix b/dev/default.nix index 784091d..6fd22b8 100644 --- a/dev/default.nix +++ b/dev/default.nix @@ -115,9 +115,16 @@ pkgs // rec { libnrm-hack = libnrm.overrideAttrs (o: { buildInputs = o.buildInputs ++ [ pkgs.clang-tools ]; }); - jupyterWithBatteries = pkgs.jupyter.override rec { - python3 = python37Packages.python.withPackages - (ps: with ps; [ nb_black msgpack warlock pyzmq pandas seaborn ]); + jupyterWithBatteries = (pkgs.jupyter.override rec { + python3 = (python37Packages.python.withPackages (ps: + with ps; [ + nb_black + msgpack + warlock + pyzmq + pandas + seaborn + ])); definitions = { # This is the Python kernel we have defined above. python3 = { @@ -134,7 +141,7 @@ pkgs // rec { logo64 = "${python3.sitePackages}/ipykernel/resources/logo-64x64.png"; }; }; - }; + }).overrideAttrs (_: { doCheck = false; }); hack = let src' = src; diff --git a/dev/python-overlay.nix b/dev/python-overlay.nix index d379609..b898914 100644 --- a/dev/python-overlay.nix +++ b/dev/python-overlay.nix @@ -6,6 +6,12 @@ let noCheckAll = pkgs.lib.mapAttrs (name: p: noCheck p); packageOverrides = pself: psuper: noCheckAll { + jupyter_client = psuper.jupyter_client; + nbformat = psuper.nbformat; + ipykernel = psuper.ipykernel; + jupyter_core = psuper.jupyter_core; + networkx = psuper.networkx; + nbconvert = psuper.nbconvert; importlab = pself.callPackage (src + "/dev/pkgs/importlab") { }; pyzmq = psuper.pyzmq.override { zeromq = pkgs.zeromq; }; pytype = pself.callPackage (src + "/dev/pkgs/pytype") { -- GitLab From 3be8c8ffe6b3859c6315b3d002304462d2bc60a5 Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Thu, 30 Jan 2020 14:57:32 -0600 Subject: [PATCH 7/7] adds "dev" branch in hydra. --- hydra.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hydra.nix b/hydra.nix index 4736464..147bb6c 100644 --- a/hydra.nix +++ b/hydra.nix @@ -21,6 +21,23 @@ "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs.git release-19.03", "emailresponsible": false } } } + , + "dev": { + "enabled": 1, + "hidden": false, + "description": "jobsets", + "nixexprinput": "hnrm", + "nixexprpath": "release.nix", + "checkinterval": 300, + "schedulingshares": 100, + "enableemail": false, + "emailoverride": "", + "keepnr": 3, + "inputs": { + "hnrm": { "type": "git", "value": "https://xgitlab.cels.anl.gov/argo/hnrm.git dev", "emailresponsible": false }, + "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs.git release-19.03", "emailresponsible": false } + } + } } EOF ''; -- GitLab