Compare commits

...

3 Commits

Author SHA1 Message Date
Astro 287989d19c overlays/plume: version all the packages 2023-12-04 03:26:28 +01:00
Astro 4694ce0d08 overlays/plume: fix 2023-12-04 03:12:08 +01:00
Astro 039b56b833 flake.nix: upgrade nixos 23.05 -> 23.11 2023-12-04 03:09:52 +01:00
6 changed files with 3928 additions and 977 deletions

View File

@ -362,16 +362,16 @@
}, },
"nixos": { "nixos": {
"locked": { "locked": {
"lastModified": 1701458931, "lastModified": 1701650192,
"narHash": "sha256-MGeSJCSMgCh29lFJg837Z5JbpF+mKEDwHBYYfQ3xwtU=", "narHash": "sha256-OlW7awIgrWkAAdFO+fjkzKD0NHneHRr023r3Ld3JBGQ=",
"owner": "SuperSandro2000", "owner": "SuperSandro2000",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "562cbe0a293d73460fe974472dfb6e0a47393780", "rev": "093be9832c89b19c94aebf78186562ef2fc267f1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "SuperSandro2000", "owner": "SuperSandro2000",
"ref": "nixos-23.05", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@ -8,7 +8,7 @@
inputs = { inputs = {
# use sandro's fork full with cherry-picked fixes # use sandro's fork full with cherry-picked fixes
nixos.url = "github:SuperSandro2000/nixpkgs/nixos-23.05"; nixos.url = "github:SuperSandro2000/nixpkgs/nixos-23.11";
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
affection-src = { affection-src = {
@ -254,7 +254,9 @@
}; };
in { in {
overlays = import ./overlays { overlays = import ./overlays {
inherit (inputs) bevy-julia bevy-mandelbrot tracer; inherit (inputs)
fenix naersk rust-overlay
bevy-julia bevy-mandelbrot tracer;
}; };
legacyPackages = lib.attrsets.mapAttrs (_: pkgs: pkgs.appendOverlays overlayList) nixos.legacyPackages; legacyPackages = lib.attrsets.mapAttrs (_: pkgs: pkgs.appendOverlays overlayList) nixos.legacyPackages;

View File

@ -1,6 +1,9 @@
{ bevy-julia { bevy-julia
, bevy-mandelbrot , bevy-mandelbrot
, tracer , tracer
, fenix
, naersk
, rust-overlay
}: }:
final: prev: final: prev:
@ -96,7 +99,9 @@ with final; {
pi-sensors = callPackage ./pi-sensors { }; pi-sensors = callPackage ./pi-sensors { };
plume = callPackage ./plume { }; plume = callPackage ./plume {
inherit fenix naersk;
};
readsb = callPackage ./readsb.nix { }; readsb = callPackage ./readsb.nix { };

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
From 62e6eb13c0df3c0925420fa393eeafb3e211dc4e Mon Sep 17 00:00:00 2001
From: Astro <astro@spaceboyz.net>
Date: Mon, 4 Dec 2023 02:43:16 +0100
Subject: [PATCH 2/2] plume-front: fixup
---
plume-front/src/editor.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plume-front/src/editor.rs b/plume-front/src/editor.rs
index 94bbbb59..1bef5004 100644
--- a/plume-front/src/editor.rs
+++ b/plume-front/src/editor.rs
@@ -168,10 +168,11 @@ fn load_autosave() {
.get(&get_autosave_id())
{
let autosave_info: AutosaveInformation = serde_json::from_str(&autosave_str).ok().unwrap();
+ let last_saved = Date::new(&JsValue::from_f64(autosave_info.last_saved)).to_date_string().as_string().unwrap();
let message = i18n!(
CATALOG,
"Do you want to load the local autosave last edited at {}?";
- Date::new(&JsValue::from_f64(autosave_info.last_saved)).to_date_string().as_string().unwrap()
+ last_saved
);
if let Ok(true) = window().unwrap().confirm_with_message(&message) {
set_value("editor-content", &autosave_info.contents);
--
2.42.0

View File

@ -1,11 +1,11 @@
{ naersk { callPackage
, system
, fenix , fenix
, nodejs , naersk
, rustPlatform , wasm-bindgen-cli
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, buildEnv , buildEnv
, fetchCrate
, pkg-config , pkg-config
, gettext , gettext
, wasm-pack , wasm-pack
@ -15,54 +15,31 @@
}: }:
let let
rust = fenix.complete.withComponents [ wasm-bindgen-cli' = wasm-bindgen-cli.override {
version = "0.2.89";
hash = "sha256-IPxP68xtNSpwJjV2yNMeepAS0anzGl02hYlSTvPocz8=";
cargoHash = "sha256-pBeQaG6i65uJrJptZQLuIaCb/WCQMhba1Z1OhYqA8Zc=";
};
rust = fenix.packages.${system}.complete.withComponents [
"cargo" "cargo"
"rustc" "rustc"
]; ];
naersk' = naersk.override { naersk' = callPackage naersk {
cargo = rust; cargo = rust;
rustc = rust; rustc = rust;
}; };
rust-wasm = with fenix; rust-wasm = with fenix.packages.${system};
combine [ combine [
minimal.rustc minimal.rustc
minimal.cargo minimal.cargo
targets.wasm32-unknown-unknown.latest.rust-std targets.wasm32-unknown-unknown.latest.rust-std
]; ];
naersk-wasm = naersk.override { naersk-wasm = callPackage naersk {
cargo = rust-wasm; cargo = rust-wasm;
rustc = rust-wasm; rustc = rust-wasm;
}; };
wasm-bindgen-cli = rustPlatform.buildRustPackage rec { version = "0.7.2-2";
pname = "wasm-bindgen-cli";
version = "0.2.81";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-DUcY22b9+PD6RD53CwcoB+ynGulYTEYjkkonDNeLbGM=";
};
cargoSha256 = "sha256-mfVQ6rSzCgwYrN9WwydEpkm6k0E3302Kfs/LaGzRSHE=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
checkInputs = [ nodejs ];
# other tests require it to be ran in the wasm-bindgen monorepo
cargoTestFlags = [ "--test=interface-types" ];
};
conv = fetchFromGitHub {
owner = "DanielKeep";
repo = "rust-conv";
rev = "master";
sha256 = "029xq9cabz3scbmd84b8qkrg0q7x6fm27ijq869lkpq8bwjxvcb6";
};
version = "0.7.2-1";
src = stdenv.mkDerivation { src = stdenv.mkDerivation {
pname = "plume-src"; pname = "plume-src";
@ -70,17 +47,14 @@ let
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Plume-org"; owner = "Plume-org";
repo = "Plume"; repo = "Plume";
# rev = version; rev = "304fb740d8ba3aaae64b3eb67ecfe476841b87c4";
rev = "620726cc2564ededb98af42c3c2e35407fcf1184"; sha256 = "sha256-nMiVMR0arhv4bwx8b5FGawjQyiOXDhRZV8ERdBtHCYM=";
sha256 = "sha256-B8EAV61qdTBGn+vGQZlXjAaSkEPs8wr9ZH1Roq3CZZs=";
}; };
phases = [ "unpackPhase" "patchPhase" "installPhase" ]; phases = [ "unpackPhase" "patchPhase" "installPhase" ];
patches = [ patches = [
./0001-cargo-update.patch ./0001-cargo-update.patch
./0002-plume-front-fixup.patch
]; ];
postPatch = ''
ln -s ${conv} rust-conv
'';
installPhase = "cp -ar . $out"; installPhase = "cp -ar . $out";
}; };
@ -91,7 +65,7 @@ let
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config
gettext gettext
wasm-bindgen-cli wasm-bindgen-cli'
]; ];
buildInputs = [ buildInputs = [
openssl openssl
@ -109,6 +83,7 @@ let
plm = naersk'.buildPackage { plm = naersk'.buildPackage {
pname = "plm"; pname = "plm";
inherit version;
root = src; root = src;
nativeBuildInputs = [ nativeBuildInputs = [
@ -123,11 +98,12 @@ let
plume-front = naersk-wasm.buildPackage { plume-front = naersk-wasm.buildPackage {
pname = "plume-front"; pname = "plume-front";
inherit version;
root = src; root = src;
nativeBuildInputs = [ nativeBuildInputs = [
gettext gettext
wasm-pack wasm-pack
wasm-bindgen-cli wasm-bindgen-cli'
binaryen binaryen
]; ];
CARGO_BUILD_TARGET = "wasm32-unknown-unknown"; CARGO_BUILD_TARGET = "wasm32-unknown-unknown";
@ -138,7 +114,7 @@ let
copyLibs = true; copyLibs = true;
overrideMain = _: { overrideMain = _: {
buildPhase = '' buildPhase = ''
wasm-pack build --mode no-install --target web --release plume-front WASM_PACK_CACHE=.wasm-pack-cache wasm-pack build --mode no-install --target web --release plume-front
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/share/plume/static mkdir -p $out/share/plume/static