Skip to content

Commit

Permalink
use nixpkgs idris2 but grab buildIdris from compiler flake
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpolzin committed Jan 11, 2024
1 parent 0af1ca3 commit a8a60be
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
1 change: 0 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
callPackage,
fetchFromGitHub,
git,
idris2,
buildIdris,
lib,
installShellFiles,
Expand Down
7 changes: 4 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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,
Expand All @@ -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;
}
Expand Down

0 comments on commit a8a60be

Please sign in to comment.