-
Notifications
You must be signed in to change notification settings - Fork 9
/
flake.nix
30 lines (27 loc) · 949 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
description = "XMonad like sway layouts";
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.swaymonad = pkgs.stdenv.mkDerivation {
pname = "swaymonad";
version = "0.0.1";
buildInputs = [
(pkgs.python310.withPackages
(pythonPackages: with pythonPackages; [ i3ipc ]))
];
unpackPhase = "true";
buildPhase = "true";
installPhase = ''
mkdir -p $out/usr/swaymonad
cp ${./.}/*.py $out/usr/swaymonad
mkdir -p $out/bin
ln -s $out/usr/swaymonad/swaymonad.py $out/bin/swaymonad
'';
};
defaultPackage = self.packages.${system}.swaymonad;
});
}