Compare commits

..

No commits in common. "b790d253341f4f5e14187f72888f8052b8fdb7cd" and "4ad20dd1dcddbb0bcd0141ce34613b0c54751943" have entirely different histories.

3 changed files with 113 additions and 3784 deletions

View File

@ -1,6 +1,43 @@
{ {
"nodes": { "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-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, "flake": false,
"locked": { "locked": {
"lastModified": 1650374568, "lastModified": 1650374568,
@ -17,6 +54,21 @@
} }
}, },
"flake-utils": { "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": { "locked": {
"lastModified": 1653893745, "lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
@ -32,6 +84,22 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1677655566,
"narHash": "sha256-I8G8Lmpp3YduYl4+pkiIJFGT1WKw+8ZMH2QwANkTu2U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ae8bdd2de4c23b239b5a771501641d2ef5e027d0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1679748960, "lastModified": 1679748960,
"narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=", "narHash": "sha256-BP8XcYHyj1NxQi04RpyNW8e7KiXSoI+Fy1tXIK2GfdA=",
@ -46,13 +114,13 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1672580127, "lastModified": 1654275867,
"narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=", "narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0874168639713f547c05947c76124f78441ea46c", "rev": "7a20c208aacf4964c19186dcad51f89165dc7ed0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -64,10 +132,10 @@
}, },
"pkgs-cargo2nix": { "pkgs-cargo2nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1655189312, "lastModified": 1655189312,
@ -85,12 +153,38 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "crane": "crane",
"nixpkgs": "nixpkgs_2",
"pkgs-cargo2nix": "pkgs-cargo2nix", "pkgs-cargo2nix": "pkgs-cargo2nix",
"unstable": "unstable" "unstable": "unstable"
} }
}, },
"rust-overlay": { "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": { "inputs": {
"flake-utils": [ "flake-utils": [
"pkgs-cargo2nix", "pkgs-cargo2nix",

View File

@ -5,12 +5,14 @@
nixpkgs.url = "nixpkgs/nixos-22.11"; nixpkgs.url = "nixpkgs/nixos-22.11";
unstable.url = "nixpkgs/nixos-unstable"; unstable.url = "nixpkgs/nixos-unstable";
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix"; pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
crane.url = "github:ipetkov/crane";
}; };
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, ... }: outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, crane, ... }:
let let
version = builtins.string 0 8 self.lastModifiedDate; version = builtins.string 0 8 self.lastModifiedDate;
supportedSystems = [ "x86_64-linux" ]; supportedSystems = [ "x86_64-linux" ];
craneLib = crane.lib."x86_64-linux";
in in
{ {
devShell."x86_64-linux" = devShell."x86_64-linux" =
@ -38,49 +40,16 @@
pkgs.pkg-config pkgs.pkg-config
pkgs.sqlite pkgs.sqlite
pkgs.rustup pkgs.rustup
pkgs.crate2nix
]; ];
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"; LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
}; };
packages."x86_64-linux" = packages."x86_64-linux" = {
let kifu-core = craneLib.buildPackage {
pkgs = import nixpkgs { system = "x86_64-linux"; }; src = craneLib.cleanCargoSource (craneLib.path ./kifu/kifu-core);
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
gobject-sys = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.wrapGAppsHook4
pkgs.gtk4
pkgs.glib
pkgs.clang
];
};
graphene-sys = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.wrapGAppsHook4
pkgs.gtk4
pkgs.glib
pkgs.clang
];
};
cairo-sys = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.wrapGAppsHook4
pkgs.gtk4
pkgs.glib
pkgs.clang
];
};
};
};
in {
kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
}).rootCrate.build;
}; };
kifu-gtk = craneLib.buildPackage {
src = craneLib.cleanCargoSource (craneLib.path ./kifu/kifu-gtk);
};
};
}; };
} }

File diff suppressed because it is too large Load Diff