Possibly add the correct toolchain and the target directive
End up with a lot of errors in the dependencies. Time to give up.
This commit is contained in:
parent
cb28fcf8c4
commit
57969d4cfa
73
flake.lock
73
flake.lock
|
@ -49,6 +49,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681202837,
|
||||||
|
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681932375,
|
"lastModified": 1681932375,
|
||||||
|
@ -81,6 +99,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681358109,
|
||||||
|
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681303793,
|
"lastModified": 1681303793,
|
||||||
"narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=",
|
"narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=",
|
||||||
|
@ -120,6 +154,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"pkgs-cargo2nix": "pkgs-cargo2nix",
|
"pkgs-cargo2nix": "pkgs-cargo2nix",
|
||||||
|
"rust-overlay": "rust-overlay_2",
|
||||||
"typeshare": "typeshare",
|
"typeshare": "typeshare",
|
||||||
"unstable": "unstable"
|
"unstable": "unstable"
|
||||||
}
|
}
|
||||||
|
@ -149,6 +184,25 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1683080331,
|
||||||
|
"narHash": "sha256-nGDvJ1DAxZIwdn6ww8IFwzoHb2rqBP4wv/65Wt5vflk=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "d59c3fa0cba8336e115b376c2d9e91053aa59e56",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
@ -164,10 +218,25 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"typeshare": {
|
"typeshare": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681765787,
|
"lastModified": 1681765787,
|
||||||
|
|
54
flake.nix
54
flake.nix
|
@ -6,9 +6,10 @@
|
||||||
unstable.url = "nixpkgs/nixos-unstable";
|
unstable.url = "nixpkgs/nixos-unstable";
|
||||||
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
|
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
|
||||||
typeshare.url = "github:savannidgerinel/typeshare/savannidgerinel/add-a-nix-flake";
|
typeshare.url = "github:savannidgerinel/typeshare/savannidgerinel/add-a-nix-flake";
|
||||||
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, typeshare, ... }:
|
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, typeshare, rust-overlay, ... }:
|
||||||
let
|
let
|
||||||
version = builtins.string 0 8 self.lastModifiedDate;
|
version = builtins.string 0 8 self.lastModifiedDate;
|
||||||
supportedSystems = [ "x86_64-linux" ];
|
supportedSystems = [ "x86_64-linux" ];
|
||||||
|
@ -49,7 +50,10 @@
|
||||||
};
|
};
|
||||||
packages."x86_64-linux" =
|
packages."x86_64-linux" =
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
pkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
overlays = [ (import rust-overlay) ];
|
||||||
|
};
|
||||||
standardOverride = attrs: {
|
standardOverride = attrs: {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgs.pkg-config
|
pkgs.pkg-config
|
||||||
|
@ -60,37 +64,8 @@
|
||||||
];
|
];
|
||||||
verbose = true;
|
verbose = true;
|
||||||
};
|
};
|
||||||
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
|
|
||||||
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain;
|
||||||
cairo-sys-rs = standardOverride;
|
|
||||||
graphene-sys = standardOverride;
|
|
||||||
gobject-sys = standardOverride;
|
|
||||||
pango-sys = standardOverride;
|
|
||||||
gio-sys = standardOverride;
|
|
||||||
gdk-pixbuf-sys = standardOverride;
|
|
||||||
gdk4-sys = standardOverride;
|
|
||||||
gsk4-sys = standardOverride;
|
|
||||||
gtk4-sys = standardOverride;
|
|
||||||
kifu-gtk = attrs: {
|
|
||||||
nativeBuildInputs = [
|
|
||||||
pkgs.glib
|
|
||||||
typeshare.packages."x86_64-linux".default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
kifu-wasm = attrs: {
|
|
||||||
nativeBuildInputs = [
|
|
||||||
typeshare.packages."x86_64-linux".default
|
|
||||||
pkgs.wasm-pack
|
|
||||||
];
|
|
||||||
buildPhase = ''
|
|
||||||
cargo build --offline
|
|
||||||
'';
|
|
||||||
installPhase = ''
|
|
||||||
exit 1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
kifu-gtk = import ./kifu/kifu-gtk {
|
kifu-gtk = import ./kifu/kifu-gtk {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
@ -101,6 +76,7 @@
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
typeshare = typeshare.packages."x86_64-linux".default;
|
typeshare = typeshare.packages."x86_64-linux".default;
|
||||||
wasm-pack = pkgs.wasm-pack;
|
wasm-pack = pkgs.wasm-pack;
|
||||||
|
rustc = rust.availableComponents.rustc;
|
||||||
};
|
};
|
||||||
|
|
||||||
kifu-pwa = let
|
kifu-pwa = let
|
||||||
|
@ -120,18 +96,6 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
kifu-wasm = (import ./kifu/kifu-pwa/core/Cargo.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
buildRustCrateForPkgs = customBuildInfo;
|
|
||||||
release = true;
|
|
||||||
}).rootCrate.build;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
kifu-wasm = import ./kifu { inherit (pkgs) rustPlatform wasm-pack; mkDerivation = pkgs.stdenv.mkDerivation; typeshare = typeshare.packages."x86_64-linux".default; };
|
|
||||||
*/
|
|
||||||
|
|
||||||
cyberpunk-splash = import ./cyberpunk-splash {
|
cyberpunk-splash = import ./cyberpunk-splash {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
typeshare = typeshare.packages."x86_64-linux".default;
|
typeshare = typeshare.packages."x86_64-linux".default;
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{ pkgs, typeshare, wasm-pack }:
|
{ pkgs, typeshare, wasm-pack, rustc }:
|
||||||
let
|
let
|
||||||
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
|
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
|
||||||
|
inherit rustc;
|
||||||
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
||||||
kifu-wasm = attrs: {
|
kifu-wasm = attrs: {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
typeshare
|
typeshare
|
||||||
];
|
];
|
||||||
|
extraRustcOpts = [ "--target wasm32-unknown-unknown" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue