From e1d0bb6d339d9a5fe87664d21f29b8f8b4ea0b7b Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 21 Oct 2024 06:42:10 -0500 Subject: [PATCH] nix builder changes --- flake.lock | 32 +++++++++----------------------- flake.nix | 5 +++-- nix/agda-bin.nix | 4 ++-- nix/docker-builder.nix | 14 ++++++++------ 4 files changed, 22 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 9a34778..55b92e8 100644 --- a/flake.lock +++ b/flake.lock @@ -3,7 +3,9 @@ "agda": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "lastModified": 1729253305, @@ -56,18 +58,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723282977, - "narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=", + "lastModified": 1729265718, + "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc", + "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-24.05", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, "nixpkgs-lib": { @@ -88,25 +88,11 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1729265718, - "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "root": { "inputs": { "agda": "agda", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } }, "systems": { diff --git a/flake.nix b/flake.nix index 223a7e6..bff8393 100644 --- a/flake.nix +++ b/flake.nix @@ -1,12 +1,13 @@ { inputs.agda.url = "github:agda/agda"; + inputs.agda.inputs.nixpkgs.follows = "nixpkgs"; outputs = { self, nixpkgs, flake-utils, agda, }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { inherit system; }; + pkgs = import nixpkgs { inherit system; overlays = [ agda.overlays.default ]; }; agda-pkg = agda.packages.x86_64-linux.default; flakePkgs = rec { - agda-bin = pkgs.callPackage ./nix/agda-bin.nix { inherit agda-pkg; }; + agda-bin = pkgs.callPackage ./nix/agda-bin.nix { agda-pkg = pkgs.haskellPackages.Agda.bin; }; docker-builder = pkgs.callPackage ./nix/docker-builder.nix { inherit agda-bin; }; }; diff --git a/nix/agda-bin.nix b/nix/agda-bin.nix index e112e85..26b3bf7 100644 --- a/nix/agda-bin.nix +++ b/nix/agda-bin.nix @@ -6,8 +6,8 @@ let writeTextFile { name = "agda-libraries"; text = '' - ${agdaPackages.cubical}/cubical.agda-lib - ${agdaPackages.standard-library}/standard-library.agda-lib + ${agdaPackages.cubical.src}/cubical.agda-lib + ${agdaPackages.standard-library.src}/standard-library.agda-lib ''; }; diff --git a/nix/docker-builder.nix b/nix/docker-builder.nix index a862a6c..03a2e26 100644 --- a/nix/docker-builder.nix +++ b/nix/docker-builder.nix @@ -1,14 +1,15 @@ { dockerTools -, awscli2 , agda-bin -, corepack -, rsync -, openssh , bash +, corepack , coreutils -, nodejs_20 +, gitMinimal , gnused +, minio-client +, nodejs_20 +, openssh , pkgsLinux +, rsync }: dockerTools.buildLayeredImage { @@ -16,13 +17,14 @@ dockerTools.buildLayeredImage { contents = with dockerTools; [ agda-bin - awscli2 bash caCertificates corepack coreutils fakeNss + gitMinimal gnused + minio-client nodejs_20 openssh rsync