on master help sign in
nix: add flake that builds the sphinx desk from base-dev, landscape desk-dev and ./desk
b1f173fiko
.gitignorenew file+1
@@ -0,0 +1 @@
1+/result
flake.locknew file+63
@@ -0,0 +1,63 @@
1+{
2+ "nodes": {
3+ "landscape": {
4+ "flake": false,
5+ "locked": {
6+ "lastModified": 1705436139,
7+ "narHash": "sha256-UziCN2QsOWsrkTCyRieS2b8ddYsoJDZmq6V5EVnZTDY=",
8+ "owner": "tloncorp",
9+ "repo": "landscape",
10+ "rev": "387c8428f783c790535c619a63484739bd941378",
11+ "type": "github"
12+ },
13+ "original": {
14+ "owner": "tloncorp",
15+ "ref": "v1.21.0",
16+ "repo": "landscape",
17+ "type": "github"
18+ }
19+ },
20+ "nixpkgs": {
21+ "locked": {
22+ "lastModified": 1792210252,
23+ "narHash": "sha256-Mh0PUaIv4nFY+8wAGonaEh8iBzwsmdNlwjVHmFg1Biw=",
24+ "owner": "NixOS",
25+ "repo": "nixpkgs",
26+ "rev": "09063bd1f2b36fd9fd793c36dfade7bd40a93dfc",
27+ "type": "github"
28+ },
29+ "original": {
30+ "owner": "NixOS",
31+ "ref": "nixos-unstable",
32+ "repo": "nixpkgs",
33+ "type": "github"
34+ }
35+ },
36+ "root": {
37+ "inputs": {
38+ "landscape": "landscape",
39+ "nixpkgs": "nixpkgs",
40+ "urbit": "urbit"
41+ }
42+ },
43+ "urbit": {
44+ "flake": false,
45+ "locked": {
46+ "lastModified": 1700242525,
47+ "narHash": "sha256-OIo4RjMDP09Ta0AA/SxflMYpYvw5XfMt812wiULS7FA=",
48+ "owner": "urbit",
49+ "repo": "urbit",
50+ "rev": "f0ae78db55362a306ee3cedd78f6e7c3b228f219",
51+ "type": "github"
52+ },
53+ "original": {
54+ "owner": "urbit",
55+ "ref": "412k-3",
56+ "repo": "urbit",
57+ "type": "github"
58+ }
59+ }
60+ },
61+ "root": "root",
62+ "version": 7
63+}
flake.nixnew file+50
@@ -0,0 +1,50 @@
1+{
2+ description = "sphinx desk";
3+
4+ inputs = {
5+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
7+ # Dependency desks. Keep them on releases for the kelvin in
8+ # desk/sys.kelvin ([%zuse 412]) and bump them together with it.
9+ urbit = {
10+ url = "github:urbit/urbit/412k-3";
11+ flake = false;
12+ };
13+ landscape = {
14+ url = "github:tloncorp/landscape/v1.21.0";
15+ flake = false;
16+ };
17+ };
18+
19+ outputs =
20+ {
21+ self,
22+ nixpkgs,
23+ urbit,
24+ landscape,
25+ }:
26+ let
27+ forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
28+ in
29+ {
30+ packages = forAllSystems (
31+ system:
32+ let
33+ pkgs = nixpkgs.legacyPackages.${system};
34+ in
35+ {
36+ # Same layering as .github/helpers/deploy.sh: base-dev, then
37+ # landscape's desk-dev, then ./desk, later layers winning. -L copies
38+ # symlink targets like rsync -L; --no-preserve=mode keeps copied
39+ # files writable so later layers can overwrite them.
40+ desk = pkgs.runCommandLocal "sphinx-desk" { } ''
41+ mkdir $out
42+ for layer in ${urbit}/pkg/base-dev ${landscape}/desk-dev ${./desk}; do
43+ cp -RL --no-preserve=mode "$layer"/. $out
44+ done
45+ '';
46+ default = self.packages.${system}.desk;
47+ }
48+ );
49+ };
50+}