From d165ad189dbf71bd66b0c7f211c45c5431499540 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 11 Nov 2024 17:53:43 -0500 Subject: [PATCH] nix: reduce lock file explosion only 1 nixpkgs input now --- flake.lock | 343 ++-------------------------- flake.nix | 8 +- nix/modules/flake-parts/haskell.nix | 7 +- 3 files changed, 21 insertions(+), 337 deletions(-) diff --git a/flake.lock b/flake.lock index ccaab83ec..5249b2947 100644 --- a/flake.lock +++ b/flake.lock @@ -16,22 +16,6 @@ "type": "github" } }, - "commonmark-simple_2": { - "flake": false, - "locked": { - "lastModified": 1705078713, - "narHash": "sha256-YgDHJG8M47ZXGLWu8o7MhXbIrgQ0Ai32Gr8nKvZGGw8=", - "owner": "srid", - "repo": "commonmark-simple", - "rev": "fc106c94f781f6a35ef66900880edc08cbe3b034", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "commonmark-simple", - "type": "github" - } - }, "commonmark-wikilink": { "flake": false, "locked": { @@ -48,89 +32,14 @@ "type": "github" } }, - "commonmark-wikilink_2": { - "flake": false, - "locked": { - "lastModified": 1705502834, - "narHash": "sha256-79fzI4fPhCkfusDXctQwwmjIcWMrLfTvUtKBY32asuM=", - "owner": "srid", - "repo": "commonmark-wikilink", - "rev": "f6d7bdf7f1fce09ba2a4259b0306b0eef24c0cf7", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "commonmark-wikilink", - "type": "github" - } - }, "ema": { - "inputs": { - "emanote": "emanote", - "flake-parts": [ - "flake-parts" - ], - "flake-root": [ - "flake-root" - ], - "haskell-flake": [ - "haskell-flake" - ], - "nixpkgs": [ - "nixpkgs" - ], - "treefmt-nix": [ - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1710101403, - "narHash": "sha256-7n+2ekoXM5ltDoirVyCX3Ob94dm7L8SllI1JMmFmeGA=", - "owner": "srid", - "repo": "ema", - "rev": "51566e4155602b0a243a369b37dc503ebdebabce", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "ema", - "type": "github" - } - }, - "ema_2": { - "inputs": { - "flake-parts": [ - "ema", - "emanote", - "flake-parts" - ], - "flake-root": [ - "ema", - "emanote", - "flake-root" - ], - "haskell-flake": [ - "ema", - "emanote", - "haskell-flake" - ], - "nixpkgs": [ - "ema", - "emanote", - "nixpkgs" - ], - "treefmt-nix": [ - "ema", - "emanote", - "treefmt-nix" - ] - }, + "flake": false, "locked": { - "lastModified": 1707484760, - "narHash": "sha256-2wHRjoFJUpVnH7H/80bnaw8h3WELZqP9dM6DfjXWtAo=", + "lastModified": 1724260267, + "narHash": "sha256-pxTlvpK0l7pek43FIz6KYAazK0BWbnuBJSFrcShVoWE=", "owner": "srid", "repo": "ema", - "rev": "e3539ddd27b72a6bb90c8614ae63c70ff3351936", + "rev": "16e2752267cd49027e281409daa25b6ecba68fd3", "type": "github" }, "original": { @@ -139,52 +48,7 @@ "type": "github" } }, - "emanote": { - "inputs": { - "commonmark-simple": "commonmark-simple_2", - "commonmark-wikilink": "commonmark-wikilink_2", - "ema": "ema_2", - "emanote-template": "emanote-template", - "flake-parts": "flake-parts", - "flake-root": "flake-root", - "haskell-flake": "haskell-flake", - "heist-extra": "heist-extra", - "nixpkgs": "nixpkgs", - "systems": "systems", - "treefmt-nix": "treefmt-nix", - "unionmount": "unionmount" - }, - "locked": { - "lastModified": 1709754457, - "narHash": "sha256-JBpIQsCSaQzLY5LnCO9xj3O7nnv0ekgO1ZTSkevRfi4=", - "owner": "srid", - "repo": "emanote", - "rev": "922f79430416b09e91d735a27b01ddbb48ef7b83", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "emanote", - "type": "github" - } - }, "emanote-template": { - "flake": false, - "locked": { - "lastModified": 1703877265, - "narHash": "sha256-2xdikzzHrIHr1s2pAJrBJU8mZP258Na3V4P4RWteDZM=", - "owner": "srid", - "repo": "emanote-template", - "rev": "9d458b63c80162519ae55814e60f17cc9d3f95a3", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "emanote-template", - "type": "github" - } - }, - "emanote-template_2": { "flake": false, "locked": { "lastModified": 1711847690, @@ -202,25 +66,9 @@ }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1704982712, - "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "07f6395285469419cf9d078f59b5b49993198c00", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1727826117, @@ -251,37 +99,7 @@ "type": "github" } }, - "flake-root_2": { - "locked": { - "lastModified": 1692742795, - "narHash": "sha256-f+Y0YhVCIJ06LemO+3Xx00lIcqQxSKJHXT/yk1RTKxw=", - "owner": "srid", - "repo": "flake-root", - "rev": "d9a70d9c7a5fd7f3258ccf48da9335e9b47c3937", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "flake-root", - "type": "github" - } - }, "haskell-flake": { - "locked": { - "lastModified": 1709233214, - "narHash": "sha256-kraFY5MmY7yxsEtSF8qPrFVmA6MXkF+sJfo7EV1dcY8=", - "owner": "srid", - "repo": "haskell-flake", - "rev": "3a8c1b58cff60886260156a20a3b3ad725bbf885", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "haskell-flake", - "type": "github" - } - }, - "haskell-flake_2": { "locked": { "lastModified": 1725314890, "narHash": "sha256-jjVrhLOlPjQiZ/8pe+g6Xc5sa563WXnNZDwGXVl4PXQ=", @@ -297,22 +115,6 @@ } }, "heist-extra": { - "flake": false, - "locked": { - "lastModified": 1706086475, - "narHash": "sha256-scXMVFKSaS4Wi4y6I84oPKHaTmLECsvq8eLxGL0XH5o=", - "owner": "srid", - "repo": "heist-extra", - "rev": "c6d8ef79b415fab276fb461d5860bbf2628e6e43", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "heist-extra", - "type": "github" - } - }, - "heist-extra_2": { "flake": false, "locked": { "lastModified": 1710541479, @@ -344,52 +146,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1704842529, - "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1703961334, - "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1727825735, - "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1712883908, "narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=", @@ -410,71 +166,18 @@ "commonmark-simple": "commonmark-simple", "commonmark-wikilink": "commonmark-wikilink", "ema": "ema", - "emanote-template": "emanote-template_2", - "flake-parts": "flake-parts_2", - "flake-root": "flake-root_2", - "haskell-flake": "haskell-flake_2", - "heist-extra": "heist-extra_2", + "emanote-template": "emanote-template", + "flake-parts": "flake-parts", + "flake-root": "flake-root", + "haskell-flake": "haskell-flake", + "heist-extra": "heist-extra", "nixos-unified": "nixos-unified", - "nixpkgs": "nixpkgs_2", - "systems": "systems_2", - "treefmt-nix": "treefmt-nix_2", - "unionmount": "unionmount_2" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix", + "unionmount": "unionmount" } }, "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "ema", - "emanote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1693468138, - "narHash": "sha256-DddblCahuTW8K0ncPOheTlG3igE8b15LJjafF1PWhOo=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "6930a5ba0a722385baf273885a03f561dcb1af67", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -495,22 +198,6 @@ } }, "unionmount": { - "flake": false, - "locked": { - "lastModified": 1691619410, - "narHash": "sha256-V9/OcGu9cy4kV9jta12A6w5BEj8awSEVYrXPpg8YckQ=", - "owner": "srid", - "repo": "unionmount", - "rev": "ed73b627f88c8f021f41ba4b518ba41beff9df42", - "type": "github" - }, - "original": { - "owner": "srid", - "repo": "unionmount", - "type": "github" - } - }, - "unionmount_2": { "flake": false, "locked": { "lastModified": 1710078535, diff --git a/flake.nix b/flake.nix index 538e2af61..ee2eba70b 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,8 @@ }; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - systems.url = "github:nix-systems/default"; flake-parts.url = "github:hercules-ci/flake-parts"; + flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; haskell-flake.url = "github:srid/haskell-flake"; treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; @@ -15,11 +15,7 @@ nixos-unified.url = "github:srid/nixos-unified"; ema.url = "github:srid/ema"; - ema.inputs.nixpkgs.follows = "nixpkgs"; - ema.inputs.haskell-flake.follows = "haskell-flake"; - ema.inputs.flake-parts.follows = "flake-parts"; - ema.inputs.treefmt-nix.follows = "treefmt-nix"; - ema.inputs.flake-root.follows = "flake-root"; + ema.flake = false; heist-extra.url = "github:srid/heist-extra"; heist-extra.flake = false; diff --git a/nix/modules/flake-parts/haskell.nix b/nix/modules/flake-parts/haskell.nix index e87d85ba4..50d87e797 100644 --- a/nix/modules/flake-parts/haskell.nix +++ b/nix/modules/flake-parts/haskell.nix @@ -9,9 +9,6 @@ haskellProjects.default = { projectFlakeName = "emanote"; projectRoot = root; - imports = [ - inputs.ema.haskellFlakeProjectModules.output - ]; devShell.tools = hp: { inherit (pkgs) stork; @@ -24,6 +21,10 @@ fsnotify.source = "0.4.1.0"; # Not in nixpkgs, yet. ghcid.source = "0.8.8"; heist-extra.source = inputs.heist-extra; + + ema.source = inputs.ema + /ema; + ema-generics.source = inputs.ema + /ema-generics; + ema-extra.source = inputs.ema + /ema-extra; }; settings = {