Refactor flake patching/recursion
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
# AUTO-UPDATE: nix-update --flake obsidian-plugin-style-settings --src-attr unpatchedSrc
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "style-settings";
|
||||
version = "1.0.9";
|
||||
|
||||
unpatchedSrc = pkgs.fetchFromGitHub {
|
||||
owner = "mgmeyers";
|
||||
repo = "obsidian-style-settings";
|
||||
rev = version;
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-eNbZQ/u3mufwVX+NRJpMSk5uGVkWfW0koXKq7wg9d+I=";
|
||||
};
|
||||
|
||||
# Wrap in applyPatches so that offlineCache below is built correctly
|
||||
src = pkgs.applyPatches {
|
||||
src = unpatchedSrc;
|
||||
src = finalAttrs.unpatchedSrc;
|
||||
patches = [ ./package-lock.patch ];
|
||||
};
|
||||
|
||||
offlineCache = pkgs.fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
yarnLock = "${finalAttrs.src}/yarn.lock";
|
||||
hash = "sha256-tqX09XWI3ZL9bXVdjgsAEuvfCAjnyWj5uSWGFbNApds=";
|
||||
};
|
||||
|
||||
@@ -35,4 +35,4 @@ pkgs.stdenv.mkDerivation rec {
|
||||
cp ./main.js $out/main.js
|
||||
cp ./styles.css $out/styles.css
|
||||
'';
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user