From 0641ed998da7b21d7df2e03d5425facde508e3c1 Mon Sep 17 00:00:00 2001 From: Akshay Date: Fri, 26 Apr 2024 13:23:28 +0100 Subject: init --- flake.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') 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