1
0
mirror of https://github.com/artizirk/wdisplays.git synced 2024-11-30 19:40:59 +02:00

Added Nix flake

Nix flake makes it easy to make CI tests, reproduce bugs and provide NixOS users with latest -git version.
This commit is contained in:
aleksana 2023-10-06 23:40:50 +08:00
parent 6233901a88
commit 56f7efc27b
3 changed files with 109 additions and 0 deletions

10
.gitignore vendored
View File

@ -1,2 +1,12 @@
/build/ /build/
*.user *.user
# Direnv
.direnv/
# pre-commit-hooks
.pre-commit-config.yaml
# Nix
result
result-*

64
flake.lock Normal file
View File

@ -0,0 +1,64 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1696193975,
"narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1696019113,
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

35
flake.nix Normal file
View File

@ -0,0 +1,35 @@
{
description = "A graphical application for configuring displays in Wayland compositors";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ self, nixpkgs, flake-parts }: flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ];
perSystem = { pkgs, system, ... }: {
packages = rec {
wdisplays = pkgs.stdenv.mkDerivation {
pname = "wdisplays";
version = "git";
src = pkgs.lib.cleanSource ./.;
nativeBuildInputs = with pkgs; [ meson ninja pkg-config wrapGAppsHook ];
buildInputs = with pkgs; [ gtk3 libepoxy wayland ];
meta = with pkgs.lib; {
description = "A graphical application for configuring displays in Wayland compositors";
homepage = "https://github.com/cyclopsian/wdisplays";
license = licenses.gpl3Plus;
platforms = platforms.linux;
mainProgram = "wdisplays";
};
};
default = wdisplays;
};
};
};
}