Add typeshare to the kifu build

This commit is contained in:
Savanni D'Gerinel 2023-04-26 18:19:49 -04:00
parent 381b7bb8b6
commit fa0f662806
2 changed files with 82 additions and 2 deletions

View File

@ -31,6 +31,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"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,
@ -62,6 +80,21 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1681303793,
"narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fe2ecaf706a5907b5e54d979fbde4924d84b65fc",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"pkgs-cargo2nix": { "pkgs-cargo2nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -87,6 +120,7 @@
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"pkgs-cargo2nix": "pkgs-cargo2nix", "pkgs-cargo2nix": "pkgs-cargo2nix",
"typeshare": "typeshare",
"unstable": "unstable" "unstable": "unstable"
} }
}, },
@ -115,6 +149,41 @@
"type": "github" "type": "github"
} }
}, },
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"typeshare": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1681765787,
"narHash": "sha256-ZzS4jSXeqhPfhxgnhar2EjcvSVU7nwsraTzuOn2cFtY=",
"owner": "savannidgerinel",
"repo": "typeshare",
"rev": "e2079972f167b2891063dc20868cecc594bf9aa1",
"type": "github"
},
"original": {
"owner": "savannidgerinel",
"ref": "savannidgerinel/add-a-nix-flake",
"repo": "typeshare",
"type": "github"
}
},
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1681920287, "lastModified": 1681920287,

View File

@ -5,9 +5,10 @@
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";
typeshare.url = "github:savannidgerinel/typeshare/savannidgerinel/add-a-nix-flake";
}; };
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, ... }: outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, typeshare, ... }:
let let
version = builtins.string 0 8 self.lastModifiedDate; version = builtins.string 0 8 self.lastModifiedDate;
supportedSystems = [ "x86_64-linux" ]; supportedSystems = [ "x86_64-linux" ];
@ -52,6 +53,9 @@
pkgs.pkg-config pkgs.pkg-config
pkgs.gtk4 pkgs.gtk4
]; ];
buildInputs = [
typeshare.packages."x86_64-linux".default
];
verbose = true; verbose = true;
}; };
customBuildInfo = pkgs: pkgs.buildRustCrate.override { customBuildInfo = pkgs: pkgs.buildRustCrate.override {
@ -65,21 +69,28 @@
gdk4-sys = standardOverride; gdk4-sys = standardOverride;
gsk4-sys = standardOverride; gsk4-sys = standardOverride;
gtk4-sys = standardOverride; gtk4-sys = standardOverride;
kifu-core = attrs: {
nativeBuildInputs = [
typeshare.packages."x86_64-linux".default
];
};
kifu-gtk = attrs: { kifu-gtk = attrs: {
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.glib pkgs.glib
typeshare.packages."x86_64-linux".default
]; ];
}; };
}; };
}; };
in { in {
# gobject-sys = pkgs.buildRustCrate cargo.internal.crates.gobject-sys;
kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix { kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
inherit pkgs; inherit pkgs;
buildRustCrateForPkgs = customBuildInfo; buildRustCrateForPkgs = customBuildInfo;
rootFeatures = [ "screenplay" ]; rootFeatures = [ "screenplay" ];
release = true; release = true;
}).rootCrate.build; }).rootCrate.build;
cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix { cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
inherit pkgs; inherit pkgs;
buildRustCrateForPkgs = customBuildInfo; buildRustCrateForPkgs = customBuildInfo;