From 67ca761fe797587fff02de1671a4c6c877f6558f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mekina?= Date: Tue, 18 Nov 2025 18:31:58 +0100 Subject: [PATCH] add pack nix build target --- flake.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index edee8ff..a7d4ea7 100644 --- a/flake.nix +++ b/flake.nix @@ -13,19 +13,20 @@ envSetup = '' unset SOURCE_DATE_EPOCH ''; - build = target: pkgs.stdenv.mkDerivation { - inherit buildInputs target; + build_with_target = target: buildOutput: pkgs.stdenv.mkDerivation { + inherit buildInputs target buildOutput; name = name + "-" + target; src = ./.; buildPhase = '' ${envSetup} - make target/$target + make $target ''; installPhase = '' mkdir $out - cp target/$target $out + cp -R $buildOutput $out ''; }; + build = target: build_with_target ("target/" + target) ("target/" + target); in { devShell = with pkgs; mkShell { @@ -58,6 +59,9 @@ packages.documentation = documentation; packages.theses = theses; packages.default = merge [documentation theses] name; + packages.pack = build_with_target "pack" (builtins.map (v: "target/pack/" + v) [ + "tultemplate2" "tultemplate2.zip" + ]); } ) );