-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
66 lines (55 loc) · 1.99 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
description = "Next generation mobile/desktop shell";
inputs = {
nixpkgs.url = "github:ExpidusOS/nixpkgs/feat/flutter-3-26-pre";
systems.url = "github:nix-systems/default-linux";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, systems, flake-utils }:
let
inherit (nixpkgs) lib;
in
flake-utils.lib.eachSystem (import systems) (system:
let
pkgs = nixpkgs.legacyPackages.${system};
deps = builtins.fromJSON (lib.readFile ./deps.json);
shortRev = self.shortRev or (lib.substring 7 7 lib.fakeHash);
shortRevCodes = lib.map lib.strings.charToInt (lib.stringToCharacters shortRev);
buildCode = lib.foldr (a: b: "${toString a}${toString b}") "" shortRevCodes;
shortVersion = "1.0.0";
version = "${shortVersion}+${buildCode}";
in {
packages.default = pkgs.flutter326.buildFlutterApplication {
pname = "genesis-shell";
version = "${shortVersion}+git-${shortRev}";
src = lib.cleanSource self;
flutterBuildFlags = [
"--dart-define=COMMIT_HASH=${shortRev}"
];
buildInputs = with pkgs; [
gtk-layer-shell
];
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
expidus = "sha256-MJWcL4MDbM4Oz1eaWZZrQQoVNeJMyl0/oWQlmdQcMKg=";
};
meta = {
description = "Next generation mobile/desktop shell.";
homepage = "https://expidusos.com";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ RossComputerGuy ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
};
devShells.default = pkgs.mkShell {
inherit (self.packages.${system}.default) pname version name;
packages = with pkgs; [
flutter326
pkg-config
gtk3
gtk-layer-shell
yq
];
};
});
}