Set up nix for static builds

This commit is contained in:
heyarne 2022-02-10 18:57:11 +01:00
commit 7d35337708
3 changed files with 22 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/result
/inkpot-cli
*.epd
*.jpg

16
default.nix Normal file
View file

@ -0,0 +1,16 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "inkpot-cli";
version = "0.0.1";
src = ./.;
vendorSha256 = "sha256-W+oAjjRYXoKM20nubO0y2yUA4WRjOn7zki3pIf9TMvc=";
meta = with lib; {
description = "Command-line tool to customize Spotify client";
homepage = "https://github.com/khanhas/spicetify-cli/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jonringer ];
};
}

View file

@ -12,8 +12,12 @@
buildInputs = with pkgs; [
go
gopls
stdenv
glibc.static
];
# LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
CFLAGS="-I${pkgs.glibc.dev}/include";
LDFLAGS="-L${pkgs.glibc}/lib";
};
};
}