summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-06-20 18:41:36 +0200
committerAlan Pearce2023-06-20 18:41:36 +0200
commit3d3ac02cf53695838eb149cc5c3a395fa4077db8 (patch)
treedc39f2c1aab8b89543eaab4a307216498d3edad5
parentea30ac77b60642d691a0508af5eb005186cf2851 (diff)
downloadwebsite-3d3ac02cf53695838eb149cc5c3a395fa4077db8.tar.lz
website-3d3ac02cf53695838eb149cc5c3a395fa4077db8.tar.zst
website-3d3ac02cf53695838eb149cc5c3a395fa4077db8.zip
Make compatible with non-flake nix
-rw-r--r--default.nix10
-rw-r--r--flake.lock17
-rw-r--r--flake.nix6
3 files changed, 32 insertions, 1 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..2cccff2
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,10 @@
+(import
+  (
+    let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
+    fetchTarball {
+      url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
+      sha256 = lock.nodes.flake-compat.locked.narHash;
+    }
+  )
+  { src = ./.; }
+).defaultNix
diff --git a/flake.lock b/flake.lock
index f8770ac..9b67443 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,21 @@
 {
   "nodes": {
+    "flake-compat": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1673956053,
+        "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
+        "type": "github"
+      },
+      "original": {
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
     "flake-utils": {
       "inputs": {
         "systems": "systems"
@@ -36,6 +52,7 @@
     },
     "root": {
       "inputs": {
+        "flake-compat": "flake-compat",
         "flake-utils": "flake-utils",
         "nixpkgs": "nixpkgs"
       }
diff --git a/flake.nix b/flake.nix
index 6625f73..24f3297 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,8 +2,12 @@
   description = "My website, alanpearce.eu";
   inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
   inputs.flake-utils.url = "github:numtide/flake-utils";
+  inputs.flake-compat = {
+    url = "github:edolstra/flake-compat";
+    flake = false;
+  };
 
-  outputs = { self, nixpkgs, flake-utils }:
+  outputs = { self, nixpkgs, flake-utils, flake-compat }:
     flake-utils.lib.eachDefaultSystem (system:
       let
         pkgs = nixpkgs.legacyPackages.${system};