-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
32 lines (27 loc) · 1.07 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ pkgs ? import <nixpkgs> { }, stdenv ? pkgs.stdenv, lib ? pkgs.lib
, buildGoModule ? pkgs.buildGoModule, fetchFromGitHub ? pkgs.fetchFromGitHub
# We use this to add matchers for stuff that's not in upstream nixpkgs, but is
# in our own overlay. No fuzzy matching from multiple options here, it's just:
# Was the command `, mything`? Run `nixpkgs.mything`.
, overlayPackages ? [ ] }:
buildGoModule rec {
pname = "btf";
version = lib.removeSuffix "\n" (builtins.readFile ./VERSION);
src = lib.cleanSource ./.;
vendorHash = "sha256-WgHE4PtimGRi81P+MASgqRiVAyhsGMU0/hJwOog6t90=";
# Since the tarball pulled from GitHub doesn't contain git tag information,
# we fetch the expected tag's timestamp from a file in the root of the
# repository.
preBuild = ''
buildFlagsArray=(
-ldflags="
-X github.com/chrispickard/btf/version.VERSION=${version}
"
)
'';
meta = with lib; {
homepage = "https://github.com/chrispickard/btf";
description = "A simple, keyboard driven app switcher/launcher for x11";
license = licenses.asl20;
};
}