Attempt a build using crane

This commit is contained in:
Savanni D'Gerinel 2023-03-29 08:13:32 -04:00
parent c2e7399e55
commit 27eb2bc346
2 changed files with 213 additions and 13 deletions

View File

@ -1,6 +1,74 @@
{
"nodes": {
"crane": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1679811681,
"narHash": "sha256-gc0lwuQxtKnUzdyfmHT6wKEuSdvn5KlRcXNkWT1/4hs=",
"owner": "ipetkov",
"repo": "crane",
"rev": "72fa29510a9ce61ea7455b4469507808684f5673",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"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": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
@ -15,13 +83,44 @@
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1678972866,
"narHash": "sha256-YV8BcNWfNVgS449B6hFYFUg4kwVIQMNehZP+FNDs1LY=",
"lastModified": 1677655566,
"narHash": "sha256-I8G8Lmpp3YduYl4+pkiIJFGT1WKw+8ZMH2QwANkTu2U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cd34d6ed7ba7d5c4e44b04a53dc97edb52f2766c",
"rev": "ae8bdd2de4c23b239b5a771501641d2ef5e027d0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1679748960,
"narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da26ae9f6ce2c9ab380c0f394488892616fc5a6a",
"type": "github"
},
"original": {
@ -30,7 +129,7 @@
"type": "indirect"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1665296151,
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=",
@ -46,13 +145,29 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1654275867,
"narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7a20c208aacf4964c19186dcad51f89165dc7ed0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-22.05",
"repo": "nixpkgs",
"type": "github"
}
},
"oxalica": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"narHash": "sha256-03Opt2yu4E/AIFjvlgib0/nhMn6B4B/t/nvwS2bzOGw=",
"narHash": "sha256-8OfySbY1hhBzj0Iz90k4se6oFCGS3+ke31vkd0d4k/o=",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
},
@ -61,20 +176,93 @@
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
}
},
"pkgs-cargo2nix": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_4",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1655189312,
"narHash": "sha256-gpJ57OgIebUpO+7F00VltxSEy6dz2x6HeJ5BcRM8rDA=",
"owner": "cargo2nix",
"repo": "cargo2nix",
"rev": "c149357cc3d17f2849c73eb7a09d07a307cdcfe8",
"type": "github"
},
"original": {
"owner": "cargo2nix",
"repo": "cargo2nix",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"crane": "crane",
"nixpkgs": "nixpkgs_2",
"oxalica": "oxalica",
"pkgs-cargo2nix": "pkgs-cargo2nix",
"unstable": "unstable"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"crane",
"flake-utils"
],
"nixpkgs": [
"crane",
"nixpkgs"
]
},
"locked": {
"lastModified": 1677812689,
"narHash": "sha256-EakqhgRnjVeYJv5+BJx/NZ7/eFTMBxc4AhICUNquhUg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e53e8853aa7b0688bc270e9e6a681d22e01cf299",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"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,16 +1,19 @@
{
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";
crane.url = "github:ipetkov/crane";
};
outputs = { self, nixpkgs, unstable, oxalica }:
outputs = { self, nixpkgs, unstable, oxalica, pkgs-cargo2nix, crane, ... }:
let
version = builtins.string 0 8 self.lastModifiedDate;
supportedSystems = [ "x86_64-linux" ];
craneLib = crane.lib."x86_64-linux";
in
{
devShell."x86_64-linux" =
@ -21,6 +24,7 @@
rust = pkgs.rust-bin.stable."1.65.0".default.override {
extensions = [ "rust-src" ];
};
cargo2nix = pkgs-cargo2nix.packages."x86_64-linux";
in
pkgs.mkShell {
name = "ld-tools-devshell";
@ -44,5 +48,13 @@
];
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
};
packages."x86_64-linux" = {
kifu-core = craneLib.buildPackage {
src = craneLib.cleanCargoSource (craneLib.path ./kifu/kifu-core);
};
kifu-gtk = craneLib.buildPackage {
src = craneLib.cleanCargoSource (craneLib.path ./kifu/kifu-gtk);
};
};
};
}