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"
}
},
"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": {
"locked": {
"lastModified": 1681932375,
@ -62,6 +80,21 @@
"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": {
"inputs": {
"flake-compat": "flake-compat",
@ -87,6 +120,7 @@
"inputs": {
"nixpkgs": "nixpkgs",
"pkgs-cargo2nix": "pkgs-cargo2nix",
"typeshare": "typeshare",
"unstable": "unstable"
}
},
@ -115,6 +149,41 @@
"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": {
"locked": {
"lastModified": 1681920287,

View File

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