Nix: Add support for building using nix
This patch adds a default nix which invokes a `callPackage` to build sources from the current working directory. To invoke the build run `nix-build`.
This commit is contained in:
parent
a1089b5af7
commit
d22f83ba06
1 changed files with 56 additions and 0 deletions
56
default.nix
Normal file
56
default.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ pkgs ? import <nixpkgs> {} }: let
|
||||
package = {
|
||||
rustPlatform,
|
||||
nix-gitignore,
|
||||
pkg-config,
|
||||
openssl,
|
||||
glib,
|
||||
gdk-pixbuf,
|
||||
graphene,
|
||||
cairo,
|
||||
pango,
|
||||
gtk4,
|
||||
libsoup_3,
|
||||
libadwaita,
|
||||
webkitgtk_6_0,
|
||||
libseccomp,
|
||||
wrapGAppsHook4,
|
||||
glib-networking,
|
||||
}: rustPlatform.buildRustPackage {
|
||||
pname = "paket";
|
||||
version = "unstable-2024-08-28";
|
||||
|
||||
src = nix-gitignore.gitignoreSource [] ./.;
|
||||
|
||||
cargoHash = "sha256-RYXnXQZZV01g65EB66LpltI7K2+O5AoqdECKPin7aDc=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
graphene
|
||||
cairo
|
||||
wrapGAppsHook4
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
# Building
|
||||
openssl
|
||||
glib
|
||||
gdk-pixbuf
|
||||
pango
|
||||
gtk4
|
||||
libsoup_3
|
||||
libadwaita
|
||||
webkitgtk_6_0 # for JSC
|
||||
|
||||
# Linking
|
||||
libseccomp
|
||||
|
||||
# Runtime
|
||||
glib-networking
|
||||
];
|
||||
|
||||
meta = {
|
||||
mainProgram = "packet";
|
||||
};
|
||||
};
|
||||
in pkgs.callPackage package { }
|
Loading…
Reference in a new issue