1
1
mirror of https://github.com/google/ormolu.git synced 2024-10-05 20:27:16 +03:00

nix: allow to pass the system attribute

This allows to build ormolu for another system as the machine's,
combined with Nix remote builders. It is also useful in a context of a
pure evaluation (like Flakes).
This commit is contained in:
zimbatm 2020-08-21 14:45:31 +02:00 committed by Mark Karpov
parent d8c3e55313
commit 0b92af2a7f
3 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{ pkgs ? (import ./nix/nixpkgs)
{ pkgs ? (import ./nix/nixpkgs { inherit system; })
, system ? builtins.currentSystem
, ormoluCompiler ? "ghc883" # the shell doesn't work with ghc8101 yet
}:

View File

@ -1,3 +1,4 @@
{ system ? builtins.currentSystem }:
let
rev = "807ca93fadd5197c2260490de0c76e500562dc05";
sha256 = "10yq8bnls77fh3pk5chkkb1sv5lbdgyk1rr2v9xn71rr1k2x563p";
@ -5,5 +6,8 @@ let
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
inherit sha256;
};
pkgs = import nixpkgs { config.allowUnfree = true; };
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in pkgs

View File

@ -1,3 +1,5 @@
{ pkgs ? (import ./nix/nixpkgs) }:
{ pkgs ? (import ./nix/nixpkgs { inherit system; })
, system ? builtins.currentSystem
}:
(import ./default.nix { inherit pkgs; }).dev.ormoluShell