diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2025-12-04 10:20:23 -0500 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-12-04 10:20:23 -0500 |
| commit | c39cc319394993299874c135564d7675a2c5da45 (patch) | |
| tree | 3763055cb549342f09eccdd0dbb8e11331021f01 /default.nix | |
| parent | 62cbce9e51781c93822e2ad4eb9a4a54e996e432 (diff) | |
Nix doesn't allow network requests while building, so the source for
discount needs to be fetched before the build is initiated.
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/default.nix b/default.nix index 958091f..14d32d8 100644 --- a/default.nix +++ b/default.nix @@ -4,19 +4,28 @@ , spdlog , abseil-cpp }: -llvmPackages.stdenv.mkDerivation rec { - pname = "msg"; - version = "0.1"; +let + discount_src = builtins.fetchGit{ + url = "https://github.com/Orc/discount.git"; + rev = "c214286f91cb754450121ad1f55a0e9470d3a16c"; + }; +in llvmPackages.stdenv.mkDerivation rec { + pname = "msg"; + version = "0.1"; - src = ./.; + src = ./.; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ]; - meta = with lib; { - homepage = "https://github.com/compromyse/msg"; - description = "Minimal Static Site Generator"; - licencse = licenses.gpl3; - platforms = with platforms; linux ++ darwin; - maintainers = [ maintainers.compromyse ]; - }; + cmakeFlags = [ + "-DDISCOUNT_SRC=${discount_src}" + ]; + + meta = with lib; { + homepage = "https://github.com/compromyse/msg"; + description = "Minimal Static Site Generator"; + licencse = licenses.gpl3; + platforms = with platforms; linux ++ darwin; + maintainers = [ maintainers.compromyse ]; + }; } |
