diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | flake.lock | 41 | ||||
-rw-r--r-- | flake.nix | 45 |
3 files changed, 87 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1 @@ | |||
result | |||
diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..0426441 --- /dev/null +++ b/flake.lock | |||
@@ -0,0 +1,41 @@ | |||
1 | { | ||
2 | "nodes": { | ||
3 | "nixpkgs": { | ||
4 | "locked": { | ||
5 | "lastModified": 1710534455, | ||
6 | "narHash": "sha256-huQT4Xs0y4EeFKn2BTBVYgEwJSv8SDlm82uWgMnCMmI=", | ||
7 | "path": "/nix/store/is9gmr40ay4smysc2dica2g8dgwxnp5d-source", | ||
8 | "rev": "9af9c1c87ed3e3ed271934cb896e0cdd33dae212", | ||
9 | "type": "path" | ||
10 | }, | ||
11 | "original": { | ||
12 | "id": "nixpkgs", | ||
13 | "type": "indirect" | ||
14 | } | ||
15 | }, | ||
16 | "root": { | ||
17 | "inputs": { | ||
18 | "nixpkgs": "nixpkgs", | ||
19 | "stmp-src": "stmp-src" | ||
20 | } | ||
21 | }, | ||
22 | "stmp-src": { | ||
23 | "flake": false, | ||
24 | "locked": { | ||
25 | "lastModified": 1713979363, | ||
26 | "narHash": "sha256-xmTDHWqH15xTXEBD8ZPTfJFNkRQUho6NGYAVbvfDPdQ=", | ||
27 | "owner": "~ser", | ||
28 | "repo": "stmp", | ||
29 | "rev": "fe95077414b4252ed414560edde8ebc2552fd76e", | ||
30 | "type": "sourcehut" | ||
31 | }, | ||
32 | "original": { | ||
33 | "owner": "~ser", | ||
34 | "repo": "stmp", | ||
35 | "type": "sourcehut" | ||
36 | } | ||
37 | } | ||
38 | }, | ||
39 | "root": "root", | ||
40 | "version": 7 | ||
41 | } | ||
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 | |||