From 18b6248dcef1b2929b5852955b9dd9ce0ce9ff2b Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 30 May 2022 09:24:56 -0400 Subject: [PATCH] Trim down flake-compat usage (#23) --- default.nix | 16 ---------------- flake.lock | 17 ----------------- flake.nix | 3 --- shell.nix | 12 ++++-------- 4 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 default.nix diff --git a/default.nix b/default.nix deleted file mode 100644 index 3c0d3a2..0000000 --- a/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -# This file exists for legacy Nix installs (nix-build & nix-env) -# https://nixos.wiki/wiki/Flakes#Using_flakes_project_from_a_legacy_Nix -# You generally do *not* have to modify this ever. -(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 2d2d399..3a121c2 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs": [ @@ -69,7 +53,6 @@ }, "root": { "inputs": { - "flake-compat": "flake-compat", "flake-parts": "flake-parts", "haskell-flake": "haskell-flake", "nixpkgs": "nixpkgs" diff --git a/flake.nix b/flake.nix index 29bede4..c57c6a7 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,6 @@ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.inputs.nixpkgs.follows = "nixpkgs"; - flake-compat.url = "github:edolstra/flake-compat"; - flake-compat.flake = false; - flake-compat.inputs.nixpkgs.follows = "nixpkgs"; haskell-flake.url = "github:srid/haskell-flake"; }; diff --git a/shell.nix b/shell.nix index 667946c..a0c9174 100644 --- a/shell.nix +++ b/shell.nix @@ -1,14 +1,10 @@ -# This file exists for legacy Nix installs (nix-build & nix-env) -# https://nixos.wiki/wiki/Flakes#Using_flakes_project_from_a_legacy_Nix -# You generally do *not* have to modify this ever. +# TODO: Remove this after https://github.com/srid/haskell-template/issues/23 + (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; + url = "https://github.com/edolstra/flake-compat/archive/b4a34015c698c7793d592d66adbab377907a2be8.tar.gz"; + sha256 = "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E="; } ) {