mirror of
https://github.com/logos-messaging/nim-sds.git
synced 2026-06-12 04:09:33 +00:00
Otherwise we end up with cache collisions like this in CI : ``` > Error: cannot open '/tmp/nim/libsds_d/@z..@f..@f..@f..@f..@f.. @ffgber@f6y2zz1uv2lzi4ln2717py8m0aix64u56-avz-hajenccrq-2.2.4@favz @fyvo@fflfgrz@frkprcgvbaf.nim.c' ```
30 lines
472 B
Nix
30 lines
472 B
Nix
{
|
|
pkgs ? import <nixpkgs> { },
|
|
}:
|
|
|
|
let
|
|
inherit (pkgs) lib stdenv;
|
|
|
|
in pkgs.mkShell {
|
|
inputsFrom = [
|
|
pkgs.androidShell
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
nim-2_2
|
|
nimble
|
|
which
|
|
git
|
|
cmake
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
pkgs.libiconv
|
|
];
|
|
|
|
# Avoid compiling Nim itself.
|
|
# Setting nim cache to proper tmp location avoids cache collision in CI
|
|
shellHook = ''
|
|
export USE_SYSTEM_NIM=1
|
|
export XDG_CACHE_HOME="$TMPDIR"
|
|
'';
|
|
}
|