diff options
-rw-r--r-- | default.nix | 31 | ||||
-rw-r--r-- | flake.lock | 62 | ||||
-rw-r--r-- | flake.nix | 42 |
3 files changed, 104 insertions, 31 deletions
diff --git a/default.nix b/default.nix deleted file mode 100644 index 173d6bb..0000000 --- a/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ pkgs ? import <nixpkgs> { }, mypkgs ? import <mypkgs> { }, ... }: - -pkgs.stdenv.mkDerivation { - name = "Overview"; - - src = ./.; - LANG = "en_US.UTF-8"; - - buildInputs = [ - pkgs.pandoc - pkgs.highlight - mypkgs.katex-wrapper - mypkgs.make-xslt - ]; - - installPhase = let - blog_feed = builtins.fetchurl { - url = "https://blog.kummerlaender.eu/atom.xml"; - }; - blip_feed = builtins.fetchurl { - url = "https://blip.kummerlaender.eu/timeline.xml"; - }; - in '' - cp ${blog_feed} source/00_content/blog_feed.xml - cp ${blip_feed} source/00_content/blip_feed.xml - - make-xslt - mkdir $out - cp -Lr target/99_result/* $out - ''; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7d6420a --- /dev/null +++ b/flake.lock @@ -0,0 +1,62 @@ +{ + "nodes": { + "mypkgs": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1629652608, + "narHash": "sha256-eNcsdqMyK/Q3P0Tj16uDNcQzKIFf4CJkM7qTq3BdtF0=", + "ref": "refs/heads/master", + "rev": "fb63603b5eec859c84464e1a7f6f14931303f679", + "revCount": 52, + "type": "git", + "url": "https://code.kummerlaender.eu/pkgs" + }, + "original": { + "type": "git", + "url": "https://code.kummerlaender.eu/pkgs" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1629271619, + "narHash": "sha256-by9D3OkEKk4rOzJIMbC0uP2wP3Bt81auP5xmbmPg2a8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7bbca9877caed472c6b5866ea09302cfcdce3dbf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "mypkgs": "mypkgs", + "stable": "stable" + } + }, + "stable": { + "locked": { + "lastModified": 1659914493, + "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.05", + "repo": "nixpkgs", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5c5e945 --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "kummerlaender.eu"; + + inputs = { + stable.url = github:NixOS/nixpkgs/nixos-21.05; + mypkgs.url = git+https://code.kummerlaender.eu/pkgs; + }; + + outputs = { self, stable, mypkgs, ... }: let + pkgs = stable.legacyPackages.x86_64-linux; + in { + defaultPackage.x86_64-linux = pkgs.stdenv.mkDerivation { + name = "Overview"; + + src = ./.; + LANG = "en_US.UTF-8"; + + buildInputs = [ + pkgs.pandoc + pkgs.highlight + mypkgs.katex-wrapper + mypkgs.make-xslt + ]; + + installPhase = let + blog_feed = builtins.fetchurl { + url = "https://blog.kummerlaender.eu/atom.xml"; + }; + blip_feed = builtins.fetchurl { + url = "https://blip.kummerlaender.eu/timeline.xml"; + }; + in '' + cp ${blog_feed} source/00_content/blog_feed.xml + cp ${blip_feed} source/00_content/blip_feed.xml + + make-xslt + mkdir $out + cp -Lr target/99_result/* $out + ''; + }; + }; +} |