mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
a36816034b
style(nix): apply nixfmt formatting chore(nix): switch nixpkgs input to channel url chore(nix): fix homepage url chore(nix): use lib.cleanSource for source filtering chore(nix): port devshell from #2584 chore(nix): derive version from lastModifiedDate and shortRev
70 lines
1.6 KiB
Nix
70 lines
1.6 KiB
Nix
{
|
|
description = "Noctalia - A lightweight Wayland shell and bar";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz";
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs }:
|
|
let
|
|
inherit (nixpkgs) lib;
|
|
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
|
|
forEachSystem =
|
|
perSystem:
|
|
lib.genAttrs systems (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
perSystem { inherit pkgs system; }
|
|
);
|
|
|
|
mkDate =
|
|
longDate:
|
|
nixpkgs.lib.concatStringsSep "-" [
|
|
(builtins.substring 0 4 longDate)
|
|
(builtins.substring 4 2 longDate)
|
|
(builtins.substring 6 2 longDate)
|
|
];
|
|
|
|
version = mkDate (self.lastModifiedDate or "19700101") + "" + (self.shortRev or "dirty");
|
|
in
|
|
{
|
|
overlays.default = final: prev: {
|
|
noctalia = final.callPackage ./nix/package.nix { inherit version; };
|
|
};
|
|
|
|
packages = forEachSystem (
|
|
{ pkgs, ... }:
|
|
{
|
|
default = pkgs.callPackage ./nix/package.nix { inherit version; };
|
|
}
|
|
);
|
|
|
|
devShells = forEachSystem (
|
|
{ pkgs, system }:
|
|
{
|
|
default = pkgs.callPackage ./nix/devshell.nix {
|
|
noctalia = self.packages.${system}.default;
|
|
};
|
|
}
|
|
);
|
|
|
|
apps = forEachSystem (
|
|
{ system, ... }:
|
|
{
|
|
default = {
|
|
type = "app";
|
|
program = lib.getExe self.packages.${system}.default;
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|