Compare commits

..

No commits in common. "d9d3438997436fa3ce8a9fa06a47efba6bd1b4eb" and "f6a47eb8b7c7044b7139bce1423297aea795c910" have entirely different histories.

2 changed files with 23 additions and 35 deletions

18
flake.lock generated
View File

@ -21,11 +21,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1704842529, "lastModified": 1700538105,
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", "narHash": "sha256-uZhOCmwv8VupEmPZm3erbr9XXmyg7K67Ul3+Rx2XMe0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", "rev": "51a01a7e5515b469886c120e38db325c96694c2f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -35,11 +35,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1704842529, "lastModified": 1700538105,
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", "narHash": "sha256-uZhOCmwv8VupEmPZm3erbr9XXmyg7K67Ul3+Rx2XMe0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", "rev": "51a01a7e5515b469886c120e38db325c96694c2f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -76,11 +76,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1694529238,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -10,32 +10,20 @@
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { }; naersk-lib = pkgs.callPackage naersk { };
in
# Needed at compile time (on build system) {
nativeBuildInputs = with pkgs; [ defaultPackage = naersk-lib.buildPackage
gtk4 {
cairo src = ./.;
glib nativeBuildInputs = with pkgs; [
pkg-config gtk4
poppler cairo
wrapGAppsHook glib
]; pkg-config
# Needed at runtime (on run system) poppler
buildInputs = with pkgs; [ ]; wrapGAppsHook
in rec { ];
defaultPackage = naersk-lib.buildPackage {
src = ./.;
inherit buildInputs;
inherit nativeBuildInputs;
};
devShell = with pkgs;
mkShell {
buildInputs =
[ cargo rustc rustfmt pre-commit rustPackages.clippy ];
# Without inheriting nativeBuildinputs, cargo build will fail but that is good since we want to use only nix build
# inherit nativeBuildInputs;
RUST_SRC_PATH = rustPlatform.rustLibSrc;
}; };
}); });
} }