Reorganize nix files

This commit is contained in:
heyarne 2022-02-11 21:53:48 +01:00
commit f0e6a9f195
3 changed files with 13 additions and 12 deletions

View file

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, stdenv, glibc }:
buildGoModule rec {
pname = "inkpot-cli";
@ -7,6 +7,12 @@ buildGoModule rec {
src = ./.;
vendorSha256 = "sha256-W+oAjjRYXoKM20nubO0y2yUA4WRjOn7zki3pIf9TMvc=";
buildInputs = [
stdenv
glibc.static
];
ldflags = "-linkmode external -extldflags -static";
meta = with lib; {
description = "Command-line tool to customize Spotify client";
homepage = "https://github.com/khanhas/spicetify-cli/";

View file

@ -8,16 +8,7 @@
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
in {
devShell.${system} = pkgs.mkShell rec {
buildInputs = with pkgs; [
go
gopls
stdenv
glibc.static
];
CFLAGS="-I${pkgs.glibc.dev}/include";
LDFLAGS="-L${pkgs.glibc}/lib";
};
defaultPackage.${system} = pkgs.callPackage ./default.nix {};
devShell.${system} = pkgs.callPackage ./shell.nix {};
};
}

4
shell.nix Normal file
View file

@ -0,0 +1,4 @@
{ mkShell, go, gopls }:
mkShell rec {
buildInputs = [ go gopls ];
}