Last active
May 27, 2020 15:04
-
-
Save bgamari/734eb02ed7295aef935da837c0c20a92 to your computer and use it in GitHub Desktop.
haskell-nix configuration for cross-compiling Hadolint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
haskellNixSrc = builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/a823ba4b7126d11ca272ef70b842b0ea5523fcfd.tar.gz; | |
haskellNix = import haskellNixSrc {}; | |
nixpkgsSrc = haskellNix.sources.nixpkgs-2003; | |
nixpkgsArgs = haskellNix.nixpkgsArgs; | |
in | |
{ pkgs ? (import nixpkgsSrc nixpkgsArgs).pkgsCross.aarch64-multiplatform-musl | |
}: | |
let | |
hspkgs = pkgs.haskell-nix.stackProject { | |
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; }; | |
}; | |
in hspkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optional: configure cachix as described in the documentation: | |
# https://github.com/input-output-hk/haskell.nix/#cache | |
# Build it! | |
$ nix build -f default.nix hadolint.components.exes.hadolint | |
$ file result/bin/hadolint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment