From 0641ed998da7b21d7df2e03d5425facde508e3c1 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 26 Apr 2024 13:23:28 +0100 Subject: init --- .gitignore | 1 + flake.lock | 41 +++++++++++++++++++++++++++++++++++++++++ flake.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix 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 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1710534455, + "narHash": "sha256-huQT4Xs0y4EeFKn2BTBVYgEwJSv8SDlm82uWgMnCMmI=", + "path": "/nix/store/is9gmr40ay4smysc2dica2g8dgwxnp5d-source", + "rev": "9af9c1c87ed3e3ed271934cb896e0cdd33dae212", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "stmp-src": "stmp-src" + } + }, + "stmp-src": { + "flake": false, + "locked": { + "lastModified": 1713979363, + "narHash": "sha256-xmTDHWqH15xTXEBD8ZPTfJFNkRQUho6NGYAVbvfDPdQ=", + "owner": "~ser", + "repo": "stmp", + "rev": "fe95077414b4252ed414560edde8ebc2552fd76e", + "type": "sourcehut" + }, + "original": { + "owner": "~ser", + "repo": "stmp", + "type": "sourcehut" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5f46344 --- /dev/null +++ b/flake.nix @@ -0,0 +1,45 @@ +# mostly lifted from https://github.com/xddxdd/nur-packages, converted into a standalone flake +{ + description = "A terminal client for *sonic music servers. Inspired by ncmpcpp."; + + inputs = { + stmp-src = { + url = sourcehut:~ser/stmp; + flake = false; + }; + }; + + outputs = + { self + , stmp-src + , nixpkgs + }: + let + supportedSystems = [ "x86_64-linux" ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + nixpkgsFor = forAllSystems (system: import nixpkgs { + inherit system; + overlays = [ self.overlays.default ]; + }); + in + { + overlays.default = final: prev: { + stmp = + final.buildGoModule { + vendorHash = "sha256-53Oat/48PtOXtITxU5j1VmHy0vCB6UzyqjDzkfZFrYI="; + pname = "stmp"; + version = "master"; + src = stmp-src; + buildInputs = [ final.mpv final.pkg-config final.libGL.dev final.xorg.libX11 ]; + CGO_ENABLED = 1; + }; + }; + + packages = forAllSystems (system: { + inherit (nixpkgsFor."${system}") stmp; + }); + + defaultPackage = forAllSystems (system: self.packages."${system}".stmp); + }; +} + -- cgit v1.2.3