delfin: add option to build in debug mode, and with debug patches
This commit is contained in:
@@ -10,20 +10,27 @@
|
|||||||
, libglvnd
|
, libglvnd
|
||||||
, libepoxy
|
, libepoxy
|
||||||
, meson
|
, meson
|
||||||
, mpv
|
, mpv-unwrapped
|
||||||
, ninja
|
, ninja
|
||||||
, openssl
|
, openssl
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, rustc
|
, rustc
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, wrapGAppsHook4
|
, wrapGAppsHook4
|
||||||
|
, devBuild ? false, git
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "delfin";
|
pname = "delfin";
|
||||||
version = "0.4.1";
|
version = "0.4.1";
|
||||||
|
|
||||||
src = fetchFromGitea {
|
src = if devBuild then fetchFromGitea {
|
||||||
|
domain = "git.uninsane.org";
|
||||||
|
owner = "colin";
|
||||||
|
repo = "delfin";
|
||||||
|
rev = "dev-sane";
|
||||||
|
hash = "sha256-l/Lm9dUtYfWbf8BoqNodF/5s0FzxhI/dyPevcaeyPME=";
|
||||||
|
} else fetchFromGitea {
|
||||||
domain = "codeberg.org";
|
domain = "codeberg.org";
|
||||||
owner = "avery42";
|
owner = "avery42";
|
||||||
repo = "delfin";
|
repo = "delfin";
|
||||||
@@ -40,6 +47,9 @@ stdenv.mkDerivation rec {
|
|||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace delfin/Cargo.toml \
|
substituteInPlace delfin/Cargo.toml \
|
||||||
--replace-warn 'rust-version = "1.76.0"' 'rust-version = "1.75.0"'
|
--replace-warn 'rust-version = "1.76.0"' 'rust-version = "1.75.0"'
|
||||||
|
'' + lib.optionalString devBuild ''
|
||||||
|
substituteInPlace video_player_mpv/sys/video-player-mpv/video-player-mpv.c \
|
||||||
|
--replace-fail '// printf("mpv log: %s\n"' 'printf("mpv log: %s\n"'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@@ -52,6 +62,8 @@ stdenv.mkDerivation rec {
|
|||||||
cargo
|
cargo
|
||||||
rustc
|
rustc
|
||||||
wrapGAppsHook4
|
wrapGAppsHook4
|
||||||
|
] ++ lib.optionals devBuild [
|
||||||
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@@ -59,11 +71,11 @@ stdenv.mkDerivation rec {
|
|||||||
libadwaita
|
libadwaita
|
||||||
libglvnd
|
libglvnd
|
||||||
libepoxy
|
libepoxy
|
||||||
mpv
|
mpv-unwrapped
|
||||||
openssl
|
openssl
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = lib.optionals (!devBuild) [
|
||||||
"-Dprofile=release"
|
"-Dprofile=release"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user