mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 16:27:51 +00:00
Merge pull request #172692 from marsam/yubikey-agent-ldflags
yubikey-agent: add ldflags
This commit is contained in:
commit
e89c0cff51
@ -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 New Issue
Block a user