From 89ed4c8472db72ea77c7fd39edea4f5756485b13 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Fri, 3 Feb 2023 16:22:45 +0800 Subject: [PATCH] Add flake-compat --- default.nix | 10 ++++++++++ flake.lock | 23 ++++++++++++++++++++--- flake.nix | 4 ++++ shell.nix | 10 ++++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 default.nix create mode 100644 shell.nix 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 bd5b4c5..6e280aa 100644 --- a/flake.lock +++ b/flake.lock @@ -174,6 +174,22 @@ } }, "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-compat_2": { "flake": false, "locked": { "lastModified": 1672831974, @@ -190,7 +206,7 @@ "type": "github" } }, - "flake-compat_2": { + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1650374568, @@ -325,7 +341,7 @@ "cabal-34": "cabal-34", "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", @@ -515,7 +531,7 @@ }, "nix-nomad": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-utils": [ "haskell-nix", "tullia", @@ -795,6 +811,7 @@ "root": { "inputs": { "CHaP": "CHaP", + "flake-compat": "flake-compat", "flake-utils": [ "haskell-nix", "flake-utils" diff --git a/flake.nix b/flake.nix index 41d06bf..681967f 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,10 @@ url = "github:input-output-hk/iohk-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; outputs = { self, nixpkgs, flake-utils, haskell-nix, CHaP, iohk-nix }: diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6234bb4 --- /dev/null +++ b/shell.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 = ./.; } +).shellNix