use overrideAttrs instead of a new derivation

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-25 15:50:09 +01:00
parent ef3394a6c8
commit 0094b20a4d
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -1,12 +1,16 @@
{ stdenv, fetchgit, lib }: let
src = builtins.fromJSON (builtins.readFile ./source.json);
in stdenv.mkDerivation {
pname = "lotte-art";
version = src.date;
{
stdenv,
fetchgit,
lib,
}: let
srcInfo = builtins.fromJSON (builtins.readFile ./source.json);
src = fetchgit {
inherit (src) url rev sha256 fetchLFS fetchSubmodules deepClone leaveDotGit;
inherit (srcInfo) url rev sha256 fetchLFS fetchSubmodules deepClone leaveDotGit;
};
preferLocalBuild = true;
in
src.overrideAttrs (_: {
pname = "lotte-art";
version = srcInfo.date;
passthru.updateScript = [
../../scripts/update-git.sh
"https://git.chir.rs/darkkirb/lotte-art"
@ -17,6 +21,4 @@ in stdenv.mkDerivation {
description = "Art I commissioned (mostly)";
license = lib.licenses.cc-by-nc-sa-40;
};
buildPhase = "true";
installPhase = "cp -r $src $out";
}
})