-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
68 lines (62 loc) · 2.32 KB
/
flake.nix
File metadata and controls
68 lines (62 loc) · 2.32 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
58
59
60
61
62
63
64
65
66
67
68
{
description = "dotdot CLI for opinionated repo management";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-25.11";
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
# Use git+file: for sibling repo access (per dotdot design)
effect-utils = {
url = "github:overengineeringstudio/effect-utils";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgsUnstable.follows = "nixpkgsUnstable";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs = { self, nixpkgs, nixpkgsUnstable, flake-utils, effect-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
pkgsUnstable = import nixpkgsUnstable { inherit system; };
gitRev = self.sourceInfo.dirtyShortRev or self.sourceInfo.shortRev or self.sourceInfo.rev or "unknown";
mkBunCli = import (effect-utils + "/nix/mk-bun-cli.nix") {
inherit pkgs pkgsUnstable;
src = ./.;
};
in
{
packages.default = mkBunCli {
name = "dotdot";
entry = "dotdot/src/cli.ts";
binaryName = "dotdot";
packageJsonPath = "dotdot/package.json";
typecheckTsconfig = "dotdot/tsconfig.json";
sources = [
{ name = "dotdot"; src = self; }
{ name = "effect-utils"; src = effect-utils; }
];
installDirs = [
"dotdot"
"effect-utils/packages/@overeng/utils"
];
bunDepsHash = "sha256-+pw1/6Gl3YlkmTwXdYrFlk4WcJjHmFicwUFEfRRqV/M=";
inherit gitRev;
};
apps.update-bun-hashes = flake-utils.lib.mkApp {
drv = import ./nix/update-bun-hashes.nix { inherit pkgs; };
};
devShells.default = pkgs.mkShell {
buildInputs = [
# Note: Built CLI excluded from devShell to allow development when build is broken.
# Use `nix build` or `nix run .#default` to build/test the CLI package.
effect-utils.packages.${system}.genie
pkgsUnstable.bun
pkgsUnstable.oxlint
pkgsUnstable.oxfmt
pkgsUnstable.typescript-go
];
shellHook = ''
export WORKSPACE_ROOT="$PWD"
'';
};
});
}