Created
May 13, 2020 09:43
-
-
Save stigtsp/a5eda4b08d07298243d2b4e1b5b643b9 to your computer and use it in GitHub Desktop.
nix overlay example
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
# .config/nixpkgs/overlays/default.nix | |
self: super: | |
let | |
callPackage = super.lib.callPackageWith super; | |
in | |
{ | |
packer = super.callPackage ./pkgs/packer {}; | |
} |
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
# .config/nixpkgs/overlays/pkgs/packer/default.nix | |
{ stdenv, buildGoPackage, fetchFromGitHub }: | |
buildGoPackage rec { | |
name = "packer-${version}"; | |
version = "1.3.5"; | |
goPackagePath = "github.com/hashicorp/packer"; | |
subPackages = [ "." ]; | |
src = fetchFromGitHub { | |
owner = "hashicorp"; | |
repo = "packer"; | |
rev = "v${version}"; | |
sha256 = "08anrc95nd5j4x4gia9rw151bdb99z72zgjdj8h0h9da177lqhbz"; | |
}; | |
meta = with stdenv.lib; { | |
description = "A tool for creating identical machine images for multiple platforms from a single source configuration"; | |
homepage = https://www.packer.io; | |
license = licenses.mpl20; | |
platforms = platforms.unix; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment