Blacksky's rsky, packaged as a nix flake with crane
0
fork

Configure Feed

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

initial commit

Mia cbb79e33

+149
+2
.gitignore
··· 1 + result 2 + *.log
+59
flake.lock
··· 1 + { 2 + "nodes": { 3 + "crane": { 4 + "locked": { 5 + "lastModified": 1773189535, 6 + "narHash": "sha256-E1G/Or6MWeP+L6mpQ0iTFLpzSzlpGrITfU2220Gq47g=", 7 + "owner": "ipetkov", 8 + "repo": "crane", 9 + "rev": "6fa2fb4cf4a89ba49fc9dd5a3eb6cde99d388269", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "ipetkov", 14 + "repo": "crane", 15 + "type": "github" 16 + } 17 + }, 18 + "nixpkgs": { 19 + "locked": { 20 + "lastModified": 1772963539, 21 + "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", 22 + "owner": "NixOS", 23 + "repo": "nixpkgs", 24 + "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", 25 + "type": "github" 26 + }, 27 + "original": { 28 + "owner": "NixOS", 29 + "ref": "nixos-unstable", 30 + "repo": "nixpkgs", 31 + "type": "github" 32 + } 33 + }, 34 + "root": { 35 + "inputs": { 36 + "crane": "crane", 37 + "nixpkgs": "nixpkgs", 38 + "systems": "systems" 39 + } 40 + }, 41 + "systems": { 42 + "locked": { 43 + "lastModified": 1681028828, 44 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 45 + "owner": "nix-systems", 46 + "repo": "default", 47 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 48 + "type": "github" 49 + }, 50 + "original": { 51 + "owner": "nix-systems", 52 + "repo": "default", 53 + "type": "github" 54 + } 55 + } 56 + }, 57 + "root": "root", 58 + "version": 7 59 + }
+88
flake.nix
··· 1 + { 2 + description = "An AT Protocol implementation prioritizing community safety and self-governance, written in Rust"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 + systems.url = "github:nix-systems/default"; 7 + crane.url = "github:ipetkov/crane"; 8 + }; 9 + 10 + outputs = 11 + { 12 + nixpkgs, 13 + crane, 14 + systems, 15 + ... 16 + }: 17 + let 18 + forAllSystems = 19 + function: nixpkgs.lib.genAttrs (import systems) (system: function nixpkgs.legacyPackages.${system}); 20 + in 21 + { 22 + packages = forAllSystems ( 23 + pkgs: 24 + let 25 + src = pkgs.fetchFromGitHub { 26 + owner = "blacksky-algorithms"; 27 + repo = "rsky"; 28 + rev = "ea60c108c5cc44ce282d58cc4b0427c64667afed"; 29 + hash = "sha256-Xib+H8NSmJgXD7uEtVHBD0O/XHM+LZJ9sRt+hHxcLUE="; 30 + }; 31 + 32 + craneLib = crane.mkLib pkgs; 33 + 34 + commonArgs = { 35 + inherit src; 36 + strictDeps = true; 37 + postPatch = "substituteInPlace Cargo.toml --replace-fail 'debug = 2' 'debug = 0'"; 38 + nativeBuildInputs = with pkgs; [ pkg-config ]; 39 + buildInputs = with pkgs; [ 40 + openssl 41 + libpq 42 + ]; 43 + }; 44 + 45 + cargoArtifacts = craneLib.buildDepsOnly commonArgs // { 46 + cargoExtraArgs = "-p rsky-pds -p rsky-relay -p rsky-wintermute"; 47 + }; 48 + 49 + crateArgs = commonArgs // { 50 + inherit cargoArtifacts; 51 + doCheck = false; 52 + }; 53 + 54 + buildPackage = 55 + name: extraArgs: 56 + craneLib.buildPackage ( 57 + crateArgs 58 + // { 59 + pname = name; 60 + version = "0.1.0"; 61 + cargoExtraArgs = "--bin ${name}"; 62 + src = src; 63 + } 64 + // extraArgs 65 + ); 66 + in 67 + { 68 + rsky-pds = buildPackage "rsky-pds"; 69 + rsky-pdsadmin = buildPackage "rsky-pdsadmin"; 70 + 71 + # this should also build rsky-relay-labeler but that's broken due to lints atm 72 + rsky-relay = buildPackage "rsky-relay" { 73 + # cargoExtraArgs = "-p rsky-relay -F labeler"; 74 + # mainProgram = "rsky-relay"; 75 + }; 76 + 77 + # TODO: rsky-satnav 78 + 79 + rsky-video = buildPackage "video-service" { }; 80 + 81 + rsky-wintermute = buildPackage "rsky-wintermute" { 82 + cargoExtraArgs = "-p rsky-wintermute"; 83 + mainProgram = "wintermute"; 84 + }; 85 + } 86 + ); 87 + }; 88 + }