From d64417b41a2c9d57727e26840ca67c2a054b0428 Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Sat, 3 Sep 2022 03:00:08 +0300 Subject: [PATCH] build(nix): wrap packages with assets in another derivation --- flake.nix | 80 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/flake.nix b/flake.nix index c567314bd9..59bd9342f8 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,9 @@ inputs.nci.url = "github:yusdacra/nix-cargo-integration"; - outputs = inputs: - inputs.nci.lib.makeOutputs { + outputs = inputs: let + lib = inputs.nci.inputs.nixpkgs.lib; + outputs = inputs.nci.lib.makeOutputs { root = ./.; defaultOutputs = { package = "veloren-voxygen"; @@ -44,18 +45,16 @@ } else (throw "Can't get revision because the git tree is dirty"); - prettyRev = with sourceInfo; builtins.substring 0 8 rev + "/" + utils.dateTimeFormat lastModified; + prettyRev = with sourceInfo; + builtins.substring 0 8 rev + + "/" + + utils.dateTimeFormat lastModified; tag = if sourceInfo ? tag then sourceInfo.tag else ""; - veloren-assets = pkgs.runCommand "makeAssetsDir" {} '' - mkdir $out - ln -sf ${./assets} $out/assets - ''; - configMoldLinker = '' cat >>$CARGO_HOME/config.toml <