summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..5f46344
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,45 @@
1# mostly lifted from https://github.com/xddxdd/nur-packages, converted into a standalone flake
2{
3 description = "A terminal client for *sonic music servers. Inspired by ncmpcpp.";
4
5 inputs = {
6 stmp-src = {
7 url = sourcehut:~ser/stmp;
8 flake = false;
9 };
10 };
11
12 outputs =
13 { self
14 , stmp-src
15 , nixpkgs
16 }:
17 let
18 supportedSystems = [ "x86_64-linux" ];
19 forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
20 nixpkgsFor = forAllSystems (system: import nixpkgs {
21 inherit system;
22 overlays = [ self.overlays.default ];
23 });
24 in
25 {
26 overlays.default = final: prev: {
27 stmp =
28 final.buildGoModule {
29 vendorHash = "sha256-53Oat/48PtOXtITxU5j1VmHy0vCB6UzyqjDzkfZFrYI=";
30 pname = "stmp";
31 version = "master";
32 src = stmp-src;
33 buildInputs = [ final.mpv final.pkg-config final.libGL.dev final.xorg.libX11 ];
34 CGO_ENABLED = 1;
35 };
36 };
37
38 packages = forAllSystems (system: {
39 inherit (nixpkgsFor."${system}") stmp;
40 });
41
42 defaultPackage = forAllSystems (system: self.packages."${system}".stmp);
43 };
44}
45