Compare commits

...

5 Commits

6 changed files with 3858 additions and 33 deletions

View File

@ -1,12 +1,28 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
@ -17,11 +33,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1678972866,
"narHash": "sha256-YV8BcNWfNVgS449B6hFYFUg4kwVIQMNehZP+FNDs1LY=",
"lastModified": 1679748960,
"narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cd34d6ed7ba7d5c4e44b04a53dc97edb52f2766c",
"rev": "da26ae9f6ce2c9ab380c0f394488892616fc5a6a",
"type": "github"
},
"original": {
@ -32,49 +48,80 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1665296151,
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=",
"owner": "NixOS",
"lastModified": 1672580127,
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "14ccaaedd95a488dd7ae142757884d8e125b3363",
"rev": "0874168639713f547c05947c76124f78441ea46c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"owner": "nixos",
"ref": "release-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"oxalica": {
"pkgs-cargo2nix": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
},
"locked": {
"narHash": "sha256-03Opt2yu4E/AIFjvlgib0/nhMn6B4B/t/nvwS2bzOGw=",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
"lastModified": 1655189312,
"narHash": "sha256-gpJ57OgIebUpO+7F00VltxSEy6dz2x6HeJ5BcRM8rDA=",
"owner": "cargo2nix",
"repo": "cargo2nix",
"rev": "c149357cc3d17f2849c73eb7a09d07a307cdcfe8",
"type": "github"
},
"original": {
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
"owner": "cargo2nix",
"repo": "cargo2nix",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"oxalica": "oxalica",
"pkgs-cargo2nix": "pkgs-cargo2nix",
"unstable": "unstable"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"pkgs-cargo2nix",
"flake-utils"
],
"nixpkgs": [
"pkgs-cargo2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1653878966,
"narHash": "sha256-T51Gck/vrJZi1m+uTbhEFTRgZmE59sydVONadADv358=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "8526d618af012a923ca116be9603e818b502a8db",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1678898370,
"narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=",
"lastModified": 1679865578,
"narHash": "sha256-sYQmxxqIYL3QFsRYjW0AufhGur8qWfwoOGPGHRJZlGc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac718d02867a84b42522a0ece52d841188208f2c",
"rev": "4361baa782dc3d3b35fd455a1adc370681d9187c",
"type": "github"
},
"original": {

View File

@ -1,13 +1,13 @@
{
description = "Lumenescent Dreams Tools";
description = "Luminescent Dreams Tools";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11";
unstable.url = "nixpkgs/nixos-unstable";
oxalica.url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
};
outputs = { self, nixpkgs, unstable, oxalica }:
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, ... }:
let
version = builtins.string 0 8 self.lastModifiedDate;
supportedSystems = [ "x86_64-linux" ];
@ -15,12 +15,9 @@
{
devShell."x86_64-linux" =
let
rust_overlay = import oxalica;
pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ rust_overlay ]; };
pkgs-unstable = import unstable { system = "x86_64-linux"; overlays = [ rust_overlay ]; };
rust = pkgs.rust-bin.stable."1.65.0".default.override {
extensions = [ "rust-src" ];
};
pkgs = import nixpkgs { system = "x86_64-linux"; };
pkgs-unstable = import unstable { system = "x86_64-linux"; };
cargo2nix = pkgs-cargo2nix.packages."x86_64-linux";
in
pkgs.mkShell {
name = "ld-tools-devshell";
@ -40,9 +37,42 @@
pkgs.pipewire
pkgs.pkg-config
pkgs.sqlite
rust
pkgs.rustup
pkgs.crate2nix
];
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
};
packages."x86_64-linux" =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
standardOverride = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.gtk4
];
verbose = true;
};
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
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;
};
};
in {
# gobject-sys = pkgs.buildRustCrate cargo.internal.crates.gobject-sys;
kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
rootFeatures = [ "screenplay" ];
release = false;
}).rootCrate.build;
};
};
}

3734
kifu/kifu-gtk/Cargo.nix Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
[package]
name = "kifu-test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

3
rust-toolchain.toml Normal file
View File

@ -0,0 +1,3 @@
[toolchain]
channel = "1.68.2"
components = ["rust-src"]