From 86e8a2e916812558a0d3ad2efefa391c1cc8b4e4 Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Sat, 6 Apr 2024 17:53:34 +0200 Subject: [PATCH] Add hacky nix workaround --- default.nix | 11 +++++++++++ flake.nix | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..f817afa --- /dev/null +++ b/default.nix @@ -0,0 +1,11 @@ +# Make this flake based dir work like a normal derivation: +# https://nixos.wiki/wiki/Flakes#Using_flakes_with_stable_Nix +(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.nix b/flake.nix index f10eae4..c5ba056 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,10 @@ description = "My personal website"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: