mirror of
https://github.com/zoriya/astal-river.git
synced 2025-12-06 06:06:10 +00:00
Add flake
This commit is contained in:
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1720031269,
|
||||
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
54
flake.nix
Normal file
54
flake.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
description = "Library and cli tool for querying river";
|
||||
|
||||
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
|
||||
wayland
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
glib
|
||||
json-glib
|
||||
];
|
||||
in {
|
||||
packages.${system} = rec {
|
||||
default = river;
|
||||
river = pkgs.stdenv.mkDerivation {
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
pname = "astal-river";
|
||||
version = version;
|
||||
src = ./.;
|
||||
outputs = ["out" "dev"];
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
};
|
||||
river = pkgs.mkShell {
|
||||
inherit nativeBuildInputs;
|
||||
buildInputs =
|
||||
buildInputs
|
||||
++ [
|
||||
pkgs.gjs
|
||||
self.packages.${system}.default
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user