ATproto Nix User Repo
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Resolve build warnings and update toolchain

- Update flake.nix to use the latest stable Rust toolchain, which
resolves the build failure related to Rust Edition 2024.
- Update pkgs/microcosm/default.nix to provide dummy package info
for the dependency-only build, silencing warnings from crane.
- Update flake.lock to use a newer version of nixpkgs.

+114 -19
+2 -4
default.nix
··· 6 6 # commands such as: 7 7 # nix-build -A mypackage 8 8 9 - { pkgs ? import <nixpkgs> { } }: 9 + { pkgs ? import <nixpkgs> { }, craneLib ? null }: 10 10 11 11 { 12 12 # The `lib`, `modules`, and `overlays` names are special ··· 14 14 modules = import ./modules; # NixOS modules 15 15 overlays = import ./overlays; # nixpkgs overlays 16 16 17 - example-package = pkgs.callPackage ./pkgs/example-package { }; 18 - # some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { }; 19 - # ... 17 + microcosm = pkgs.callPackage ./pkgs/microcosm { inherit craneLib; }; 20 18 }
+55 -4
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "crane": { 4 + "locked": { 5 + "lastModified": 1758215636, 6 + "narHash": "sha256-8nkzkPbdxze8CxWhKWlcLbJEU1vfLM/nVqRlTy17V54=", 7 + "owner": "ipetkov", 8 + "repo": "crane", 9 + "rev": "a669fe77a8b0cd6f11419d89ea45a16691ca5121", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "ipetkov", 14 + "repo": "crane", 15 + "type": "github" 16 + } 17 + }, 3 18 "nixpkgs": { 4 19 "locked": { 5 - "lastModified": 1712449641, 6 - "narHash": "sha256-U9DDWMexN6o5Td2DznEgguh8TRIUnIl9levmit43GcI=", 20 + "lastModified": 1758262103, 21 + "narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=", 22 + "owner": "NixOS", 23 + "repo": "nixpkgs", 24 + "rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01", 25 + "type": "github" 26 + }, 27 + "original": { 28 + "owner": "NixOS", 29 + "ref": "nixpkgs-unstable", 30 + "repo": "nixpkgs", 31 + "type": "github" 32 + } 33 + }, 34 + "nixpkgs_2": { 35 + "locked": { 36 + "lastModified": 1744536153, 37 + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", 7 38 "owner": "NixOS", 8 39 "repo": "nixpkgs", 9 - "rev": "600b15aea1b36eeb43833a50b0e96579147099ff", 40 + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", 10 41 "type": "github" 11 42 }, 12 43 "original": { ··· 18 49 }, 19 50 "root": { 20 51 "inputs": { 21 - "nixpkgs": "nixpkgs" 52 + "crane": "crane", 53 + "nixpkgs": "nixpkgs", 54 + "rust-overlay": "rust-overlay" 55 + } 56 + }, 57 + "rust-overlay": { 58 + "inputs": { 59 + "nixpkgs": "nixpkgs_2" 60 + }, 61 + "locked": { 62 + "lastModified": 1758335443, 63 + "narHash": "sha256-2jaGMj32IckpZgBjn7kG4zyJl66T+2A1Fn2ppkHh91o=", 64 + "owner": "oxalica", 65 + "repo": "rust-overlay", 66 + "rev": "f1ccb14649cf87e48051a6ac3a571b4a57d84ff3", 67 + "type": "github" 68 + }, 69 + "original": { 70 + "owner": "oxalica", 71 + "repo": "rust-overlay", 72 + "type": "github" 22 73 } 23 74 } 24 75 },
+16 -4
flake.nix
··· 1 1 { 2 2 description = "My personal NUR repository"; 3 3 inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 4 - outputs = { self, nixpkgs }: 4 + inputs.rust-overlay.url = "github:oxalica/rust-overlay"; 5 + inputs.crane.url = "github:ipetkov/crane"; 6 + 7 + outputs = { self, nixpkgs, rust-overlay, crane }@inputs: 5 8 let 6 9 forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; 7 10 in 8 11 { 9 - legacyPackages = forAllSystems (system: import ./default.nix { 10 - pkgs = import nixpkgs { inherit system; }; 11 - }); 12 + legacyPackages = forAllSystems (system: 13 + let 14 + overlays = [ (import rust-overlay) ]; 15 + pkgs = import nixpkgs { inherit system overlays; }; 16 + rustToolchain = pkgs.rust-bin.stable.latest.default.override { 17 + extensions = [ "rust-src" ]; 18 + }; 19 + craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; 20 + in 21 + import ./default.nix { 22 + inherit pkgs craneLib; 23 + }); 12 24 packages = forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system}); 13 25 }; 14 26 }
+41 -7
pkgs/microcosm/default.nix
··· 1 - { stdenv }: 1 + { pkgs, craneLib }: 2 2 3 - stdenv.mkDerivation rec { 4 - name = "example-package-${version}"; 5 - version = "1.0"; 6 - src = ./.; 7 - buildPhase = "echo echo Hello World > example"; 8 - installPhase = "install -Dm755 example $out"; 3 + let 4 + src = pkgs.fetchFromGitHub { 5 + owner = "at-microcosm"; 6 + repo = "microcosm-rs"; 7 + rev = "b0a66a102261d0b4e8a90d34cec3421073a7b728"; 8 + sha256 = "sha256-swdAcsjRWnj9abmnrce5LzeKRK+LHm8RubCEIuk+53c="; 9 + }; 10 + 11 + commonArgs = { 12 + inherit src; 13 + pname = "microcosm-rs-deps"; 14 + version = "0.1"; 15 + buildInputs = with pkgs; [ 16 + openssl 17 + zlib 18 + ]; 19 + nativeBuildInputs = with pkgs; [ 20 + pkg-config 21 + ]; 22 + }; 23 + 24 + cargoArtifacts = craneLib.buildDepsOnly commonArgs; 25 + 26 + buildPackage = pname: craneLib.buildPackage (commonArgs // { 27 + inherit pname; 28 + cargoArtifacts = cargoArtifacts; 29 + }); 30 + 31 + in 32 + { 33 + constellation = buildPackage "constellation"; 34 + jetstream = buildPackage "jetstream"; 35 + links = buildPackage "links"; 36 + pocket = buildPackage "pocket"; 37 + quasar = buildPackage "quasar"; 38 + reflector = buildPackage "reflector"; 39 + slingshot = buildPackage "slingshot"; 40 + spacedust = buildPackage "spacedust"; 41 + ufos = buildPackage "ufos"; 42 + "who-am-i" = buildPackage "who-am-i"; 9 43 }