forked from mirrors/nixpkgs
yubikey-agent: add ldflags
This commit is contained in:
parent
b610a3cf3f
commit
e5ca1b8253
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, lib, fetchFromGitHub, buildGoModule, libnotify, makeWrapper, pcsclite, pkg-config, darwin }:
|
||||
{ stdenv, lib, fetchFromGitHub, buildGoModule, libnotify, pcsclite, pkg-config, darwin }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "yubikey-agent";
|
||||
|
@ -15,7 +15,7 @@ buildGoModule rec {
|
|||
lib.optional stdenv.isLinux (lib.getDev pcsclite)
|
||||
++ lib.optional stdenv.isDarwin (darwin.apple_sdk.frameworks.PCSC);
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkg-config ];
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
|
||||
|
||||
postPatch = lib.optionalString stdenv.isLinux ''
|
||||
substituteInPlace main.go --replace 'notify-send' ${libnotify}/bin/notify-send
|
||||
|
@ -27,6 +27,8 @@ buildGoModule rec {
|
|||
|
||||
subPackages = [ "." ];
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p $out/lib/systemd/user
|
||||
substitute contrib/systemd/user/yubikey-agent.service $out/lib/systemd/user/yubikey-agent.service \
|
||||
|
|
Loading…
Reference in a new issue