diff --git a/default.nix b/default.nix index 03954f5..9be7eb3 100644 --- a/default.nix +++ b/default.nix @@ -2,7 +2,6 @@ callPackage, fetchFromGitHub, git, - idris2, buildIdris, lib, installShellFiles, diff --git a/flake.lock b/flake.lock index b37df17..114656d 100644 --- a/flake.lock +++ b/flake.lock @@ -116,15 +116,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1704513904, - "narHash": "sha256-e+uXTIF5AGgIszIAZhF3vg+JBIwo9i407kUEFB+WxuM=", + "lastModified": 1704842529, + "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "338a8dc6c108e5cae1e2d24dc131bdef4f6e24c1", + "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index a12505d..056c629 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Harmony GitHub collaboration tool"; inputs = { - nixpkgs.url = github:NixOS/nixpkgs; + nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable; idris.url = github:mattpolzin/Idris2/fix-install-output-buildIdris; idris.inputs.nixpkgs.follows = "nixpkgs"; @@ -11,6 +11,9 @@ alejandra.inputs.nixpkgs.follows = "nixpkgs"; }; + # we grab Idris2 from nixpkgs unstable because it will already be built and cached. + # we use the idris2 compiler repo to grab the buildIdris function that isn't available + # in nixpkgs yet. outputs = { self, nixpkgs, @@ -21,12 +24,13 @@ forAllSystems = lib.genAttrs lib.systems.flakeExposed; in { packages = forAllSystems ( - system: { - harmony = with nixpkgs.legacyPackages.${system}; - callPackage ./default.nix { - idris2 = idris.packages.${system}.idris2; - buildIdris = idris.buildIdris.${system}; - }; + system: let + pkgs = nixpkgs.legacyPackages.${system}; + buildIdris = idris.buildIdris.${system}.override {inherit (pkgs) idris2;}; + in { + harmony = pkgs.callPackage ./default.nix { + inherit buildIdris; + }; default = self.packages.${system}.harmony; }