Add NIX flake package
This commit is contained in:
35
README.md
35
README.md
@@ -1,14 +1,18 @@
|
||||
# activate-linux for Wayland
|
||||
|
||||
The "Activate Windows" watermark ported to Linux with Gtk Layer Shell
|
||||
|
||||
# Linux
|
||||
|
||||
## Dependencies
|
||||
|
||||
This project depends on:
|
||||
|
||||
- `gtk-3.0` (on some distros also `libgtk-3-dev`)
|
||||
- `gtk-layer-shell` and any [supported wayland compositor](https://github.com/wmww/gtk-layer-shell#supported-desktops)
|
||||
|
||||
## Building
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
@@ -20,3 +24,34 @@ make
|
||||
This project is in the AUR under [activate-linux-wayland-git](https://aur.archlinux.org/packages/activate-linux-wayland-git)
|
||||
|
||||
Install it using your favorite AUR helper.
|
||||
|
||||
### NixOS
|
||||
|
||||
#### NixOS installation with Flakes
|
||||
|
||||
Just import flake and use `defaultPackage`.
|
||||
|
||||
```nix
|
||||
{
|
||||
........
|
||||
inputs.activate-linux = {
|
||||
url = "github:Kljunas2/activate-linux";
|
||||
inputs.nixpkgs.follows = "nixpkgs"; # not mandatory but recommended
|
||||
};
|
||||
........
|
||||
|
||||
outputs = { self, nixpkgs, activate-linux }: {
|
||||
........
|
||||
modules = [
|
||||
({ self, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
........
|
||||
activate-linux.defaultPackage.xf86_64-linux
|
||||
........
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
42
flake.lock
generated
Normal file
42
flake.lock
generated
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1652875358,
|
||||
"narHash": "sha256-mIUPX/wMS6ASa1AshLPOvKj8HvjwK4rnlLiaJBUOhRc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "51c998bdd9f0d6e809cf31acb95cccb627075004",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1652776076,
|
||||
"narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
25
flake.nix
Normal file
25
flake.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
description = "Activate Linux watermark for wayland";
|
||||
|
||||
inputs.utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
|
||||
outputs = { self, nixpkgs, utils }:
|
||||
utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages.activate-linux = pkgs.stdenv.mkDerivation {
|
||||
pname = "activate-linux";
|
||||
version = "0.0.1";
|
||||
src = ./.;
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
buildInputs = with pkgs; [ gtk3 gtk-layer-shell ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bin/activate-linux $out/bin/activate-linux
|
||||
'';
|
||||
};
|
||||
|
||||
defaultPackage = self.packages.${system}.activate-linux;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user