Commit 6249c13d authored by Valentin Reis's avatar Valentin Reis
Browse files

[fix] Changes to the build chain to restore pynrm.so resolution of haskell rts.

parent 7d8c40dd
Pipeline #12115 passed with stages
in 4 minutes and 33 seconds
......@@ -48,7 +48,17 @@ app-tests:
'
tests-%:
@nix-shell --pure -p procps nrm haskellPackages.shelltestrunner --run '
@nix-shell --pure -E '
with (import <nixpkgs> {});
mkShell {
buildInputs = [
(pythonPackages.python.withPackages (ps: with ps; [pynrm]))
procps
nrm
haskellPackages.shelltestrunner
];
shellHook = "export PYNRMSO=$${haskellPackages.hsnrm-extra}/bin/pynrm.so";
} ' --run bash <<< '
shelltest -a --execdir -o50 tests/$*
'
......
......@@ -14,15 +14,16 @@ NIX_PATH := nixpkgs=./.
all: bin/nrm bin/nrm.so bin/pynrm.so
.PHONY: bin/nrm
bin/nrm.so bin/nrm: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
bin/nrm.so bin/nrm: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
@nix-shell --pure --run bash <<< '
cabal v2-install hsnrm-bin --installdir=./bin --overwrite-policy=always
'
.PHONY: bin/pynrm.so
bin/pynrm.so: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
bin/pynrm.so: hsnrm-extra/hsnrm-extra.cabal hsnrm-static/hsnrm-static.cabal hsnrm-bin/hsnrm-bin.cabal hsnrm/hsnrm.cabal
ln -s $$GHCRTSPATH hsnrm-extra/lHSrts
@nix-shell --pure --run bash <<< '
cabal v2-install hsnrm-extra --installdir=./bin --overwrite-policy=always
cabal v2-install hsnrm-extra:pynrm.so --installdir=./bin --overwrite-policy=always
'
.PHONY: ghcid
......@@ -91,6 +92,7 @@ hlint:
.PHONY:clean
clean:
rm -f hsnrm-extra/lHSrts/
rm -rf dist-newstyle
rm -f hsnrm.cabal
rm -f hsnrm.nix
......
......@@ -39,7 +39,8 @@ executable pynrm.so
-Wmissing-local-signatures -Wmissing-exported-signatures
-Wmissing-export-lists -Wmissing-home-modules -Widentities
-Wredundant-constraints -Wpartial-fields -Wmissed-specialisations
-Wall-missed-specialisations -fPIC -shared -no-hs-main -dynamic
-Wall-missed-specialisations -fPIC -shared -no-hs-main -dynamic -lHSrts-ghc8.6.5
extra-lib-dirs: ./lHSrts
build-depends:
hsnrm -any,
base -any,
......
......@@ -17,5 +17,6 @@ haskellPackages.shellFor {
shellHook = ''
export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive
export LANG=en_US.UTF-8
export GHCRTSPATH="${haskellPackages.ghc}/lib/ghc-$(ghc --numeric-version)/rts/"
'';
}
......@@ -128,6 +128,7 @@ pkgs // rec {
paths = [
haskellPackages.hsnrm
haskellPackages.hsnrm-bin
haskellPackages.hsnrm-extra
pynrm
pkgs.linuxPackages.perf
pkgs.hwloc
......
......@@ -107,7 +107,7 @@ in mkShell {
export NRMSO=${pwd}/hsnrm/bin/nrm.so
export PATH=:${pwd}/pynrm/bin:${pwd}/hsnrm/bin:$PATH
export PYTHONPATH=${pwd}/pynrm/:$PYTHONPATH
export NIX_GHC="${haskellPackages.hsnrm.env.NIX_GHC}"
export GHCRTSPATH="${haskellPackages.ghc}/lib/ghc-$(ghc --numeric-version)/rts/"
export NIX_GHCPKG="${haskellPackages.hsnrm.env.NIX_GHCPKG}"
export NIX_GHC_DOCDIR="${haskellPackages.hsnrm.env.NIX_GHC_DOCDIR}"
export NIX_GHC_LIBDIR="${haskellPackages.hsnrm.env.NIX_GHC_LIBDIR}"
......
#!/usr/bin/env python
import nrm.tooling as nrm
with nrm.nrmd as d:
with nrm.nrmd('') as d:
print("success")
$ ./spawn.py 2> /dev/null
$ ./spawn.py
> /success/
>= 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment