37 lines
967 B
Nix
37 lines
967 B
Nix
{
|
|
pkgs ? import <nixpkgs> { },
|
|
...
|
|
}:
|
|
let
|
|
version = "8.0.2";
|
|
author = "kepano";
|
|
repo = "obsidian-minimal-settings";
|
|
|
|
css = builtins.fetchurl {
|
|
url = "https://github.com/${author}/${repo}/releases/download/${version}/styles.css";
|
|
sha256 = "sha256:07nkr3sm7dkg8hbmqn45zyaafcblbbvh2s5qlhjh2x0zmi6kmx45";
|
|
};
|
|
|
|
js = builtins.fetchurl {
|
|
url = "https://github.com/${author}/${repo}/releases/download/${version}/main.js";
|
|
sha256 = "sha256:0s935p4890mk2b15ffqxyggfcp9p60y1k1121ayni4hh1iinnkcv";
|
|
};
|
|
in
|
|
pkgs.stdenv.mkDerivation {
|
|
name = "obsidian.plugins.minimal-settings";
|
|
|
|
src = builtins.fetchurl {
|
|
url = "https://github.com/${author}/${repo}/releases/download/${version}/manifest.json";
|
|
sha256 = "sha256:1akim1ymm3za9h3h2jy82gc7wviwxvv9kc8rqmp69v9y3h1dn10z";
|
|
};
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp $src $out/manifest.json
|
|
cp ${css} $out/styles.css
|
|
cp ${js} $out/main.js
|
|
'';
|
|
}
|