added comments to explain need help with one section marked TODO
This commit is contained in:
parent
f098443518
commit
dab2edce05
2 changed files with 11 additions and 7 deletions
|
|
@ -10,9 +10,6 @@
|
|||
# System types to support.
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||
|
|
@ -24,18 +21,20 @@
|
|||
in
|
||||
{
|
||||
|
||||
# Provide some binary packages for selected system types.
|
||||
# Provide some binary packages for selected system types by mapping over each system architecture.
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
# Set pkgs = the correct version for a given architecture.
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in
|
||||
{
|
||||
#TODO: NEED TO GO OVER THIS SYNTAX AGAIN.
|
||||
go-hello = pkgs.callPackage ./package.nix { };
|
||||
}
|
||||
);
|
||||
|
||||
# Add dependencies that are only needed for development
|
||||
# Add dependencies that are only needed for development, this also allows for nix develop command to launch a devshell
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ buildGoModule, gitMinimal }:
|
||||
# This is the wrapping around mkderivation that abstracts away the standard boilerplate logic for building go packages.
|
||||
buildGoModule {
|
||||
# The final built binary name.
|
||||
pname = "go-hello";
|
||||
# The binary version | NEEDS TO BE IN STEP WITH GO MOD.
|
||||
version = "v1.0.0";
|
||||
# In 'nix develop', we don't need a copy of the source tree
|
||||
# in the Nix store.
|
||||
|
|
@ -8,8 +11,10 @@ buildGoModule {
|
|||
name = "source";
|
||||
path = ./.;
|
||||
};
|
||||
vendorHash = null;
|
||||
|
||||
# required deps for build time nativeBuildInputs are runtime deps
|
||||
buildInputs = [
|
||||
# Just an example input
|
||||
gitMinimal
|
||||
];
|
||||
# This hash locks the dependencies of this package. It is
|
||||
|
|
@ -21,5 +26,5 @@ buildGoModule {
|
|||
# To begin with it is recommended to set this, but one must
|
||||
# remember to bump this hash when your dependencies change.
|
||||
# vendorHash = pkgs.lib.fakeHash;
|
||||
|
||||
vendorHash = null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue