forked from y3owk1n/neru
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
57 lines (50 loc) · 1.71 KB
/
Copy pathflake.nix
File metadata and controls
57 lines (50 loc) · 1.71 KB
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
{
description = "Navigate everywhere without touching your mouse - keyboard-driven productivity at its finest";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
eachSystem = nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
# "x86_64-darwin" # EOL for nixpkgs 26.11+
"x86_64-linux"
];
# Update this to your latest release version
latestVersion = "1.50.0";
# Function to build package with specific version
makeNeruPackage =
pkgs: version: useZip: commitHash:
pkgs.callPackage ./nix/package.nix {
inherit version useZip commitHash;
apple-sdk_15 = pkgs.apple-sdk_15 or null;
};
in
{
overlays.default = final: prev: {
neru = makeNeruPackage final latestVersion true null;
neru-source = makeNeruPackage final "main" false (self.rev or self.dirtyRev or "unknown");
};
# Packages output using the overlay
packages = eachSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in
{
# Default: latest version from zip for all supported platforms
default = makeNeruPackage pkgs latestVersion true null;
# Build from source (for users who want to build from source)
source = makeNeruPackage pkgs "main" false (self.rev or self.dirtyRev or "unknown");
}
);
darwinModules.default = import ./nix/darwin.nix;
nixosModules.default = import ./nix/nixos.nix;
homeManagerModules.default = import ./nix/home.nix;
};
}