39 lines
979 B
Nix
39 lines
979 B
Nix
{ pkgs, ... }:
|
|
# AUTO-UPDATE: nix-update --flake obsidian-plugin-style-settings --src-attr unpatchedSrc
|
|
pkgs.stdenv.mkDerivation rec {
|
|
pname = "obsidian-plugin-style-settings";
|
|
version = "1.0.9";
|
|
|
|
unpatchedSrc = pkgs.fetchFromGitHub {
|
|
owner = "mgmeyers";
|
|
repo = "obsidian-style-settings";
|
|
rev = version;
|
|
hash = "sha256-eNbZQ/u3mufwVX+NRJpMSk5uGVkWfW0koXKq7wg9d+I=";
|
|
};
|
|
|
|
# Wrap in applyPatches so that offlineCache below is built correctly
|
|
src = pkgs.applyPatches {
|
|
src = unpatchedSrc;
|
|
patches = [ ./package-lock.patch ];
|
|
};
|
|
|
|
offlineCache = pkgs.fetchYarnDeps {
|
|
yarnLock = "${src}/yarn.lock";
|
|
hash = "sha256-tqX09XWI3ZL9bXVdjgsAEuvfCAjnyWj5uSWGFbNApds=";
|
|
};
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
nodejs
|
|
yarnConfigHook
|
|
yarnBuildHook
|
|
npmHooks.npmInstallHook
|
|
];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp ./manifest.json $out/manifest.json
|
|
cp ./main.js $out/main.js
|
|
cp ./styles.css $out/styles.css
|
|
'';
|
|
}
|