-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
45 lines (40 loc) · 1.29 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
{
description = "A simple command-line tool to create Finder aliases";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
outputs = { self, nixpkgs }:
let
inherit (nixpkgs) lib;
forAllSystems = lib.genAttrs [ "aarch64-darwin" "x86_64-darwin" ];
in {
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
inherit (self.packages.${system}.default) buildInputs nativeBuildInputs;
packages = lib.attrValues {
inherit (pkgs) cargo clippy rustfmt rustc rust-analyzer;
};
};
});
apps = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
mkalias = {
type = "app";
program = "${lib.getBin self.packages.${system}.mkalias}/bin/mkalias";
};
default = self.apps.${system}.mkalias;
});
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
mkalias = pkgs.callPackage ./default.nix {
inherit (pkgs.darwin.apple_sdk.frameworks) CoreFoundation;
};
default = self.packages.${system}.mkalias;
});
};
}