shell.nix: nimble -> nim
This commit is contained in:
parent
5268bc87bf
commit
cad129bd04
27
shell.nix
27
shell.nix
|
@ -2,32 +2,15 @@
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let
|
mkShell {
|
||||||
nimlibs = stdenv.mkDerivation {
|
name = "oeffisearch-shell";
|
||||||
pname = "nimlibs";
|
|
||||||
version = nim.version;
|
|
||||||
src = nim;
|
|
||||||
nativeBuildInputs = [ nim ];
|
|
||||||
buildPhase = ''
|
|
||||||
nim c -d:release --nimcache:$PWD -o:libnimrtl.so lib/nimrtl.nim
|
|
||||||
nim c -d:release --nimcache:$PWD -o:libnimhcr.so lib/nimhcr.nim
|
|
||||||
'';
|
|
||||||
installPhase = ''
|
|
||||||
install -Dm644 libnimrtl.so $out/lib/libnimrtl.so
|
|
||||||
install -Dm644 libnimhcr.so $out/lib/libnimhcr.so
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
pname = "oeffisearch";
|
|
||||||
version = "0.1.0";
|
|
||||||
nativeBuildInputs = [ nim ];
|
nativeBuildInputs = [ nim ];
|
||||||
LD_LIBRARY_PATH = lib.makeLibraryPath [ openssl nim nimlibs ];
|
LD_LIBRARY_PATH = lib.makeLibraryPath [ openssl ];
|
||||||
CACHE_PATH = toString ./cache;
|
CACHE_PATH = toString ./cache;
|
||||||
NIX_ENFORCE_PURITY = 0;
|
NIX_ENFORCE_PURITY = 0;
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
#nimble run --hotcodereloading:on oeffisearch
|
nim c src/oeffisearch.nim
|
||||||
nimble run oeffisearch
|
./src/oeffisearch
|
||||||
exit
|
exit
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue