add nix flake (#1)

This commit is contained in:
Aylur
2024-07-18 17:16:00 +02:00
committed by GitHub
parent bccb03463f
commit 35cd0fb43d
2 changed files with 81 additions and 0 deletions
Generated
+27
View File
@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
+54
View File
@@ -0,0 +1,54 @@
{
description = "Wrapper library for WirePlumber";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = {
self,
nixpkgs,
}: let
version = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./version);
system = "x86_64-linux";
pkgs = import nixpkgs {inherit system;};
nativeBuildInputs = with pkgs; [
gobject-introspection
meson
pkg-config
ninja
vala
];
buildInputs = with pkgs; [
glib
wireplumber
# json-glib
];
in {
packages.${system} = rec {
default = wireplumber;
wireplumber = pkgs.stdenv.mkDerivation {
inherit nativeBuildInputs buildInputs;
pname = "astal-wireplumber";
version = version;
src = ./.;
outputs = ["out" "dev"];
};
};
devShells.${system} = {
default = pkgs.mkShell {
inherit nativeBuildInputs buildInputs;
};
wireplumber = pkgs.mkShell {
inherit nativeBuildInputs;
buildInputs =
buildInputs
++ [
self.packages.${system}.default
pkgs.gjs
];
};
};
};
}