delfin: add option to build in debug mode, and with debug patches
This commit is contained in:
@@ -10,20 +10,27 @@
|
||||
, libglvnd
|
||||
, libepoxy
|
||||
, meson
|
||||
, mpv
|
||||
, mpv-unwrapped
|
||||
, ninja
|
||||
, openssl
|
||||
, pkg-config
|
||||
, rustc
|
||||
, rustPlatform
|
||||
, wrapGAppsHook4
|
||||
, devBuild ? false, git
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "delfin";
|
||||
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";
|
||||
owner = "avery42";
|
||||
repo = "delfin";
|
||||
@@ -40,6 +47,9 @@ stdenv.mkDerivation rec {
|
||||
postPatch = ''
|
||||
substituteInPlace delfin/Cargo.toml \
|
||||
--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 = [
|
||||
@@ -52,6 +62,8 @@ stdenv.mkDerivation rec {
|
||||
cargo
|
||||
rustc
|
||||
wrapGAppsHook4
|
||||
] ++ lib.optionals devBuild [
|
||||
git
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -59,11 +71,11 @@ stdenv.mkDerivation rec {
|
||||
libadwaita
|
||||
libglvnd
|
||||
libepoxy
|
||||
mpv
|
||||
mpv-unwrapped
|
||||
openssl
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
mesonFlags = lib.optionals (!devBuild) [
|
||||
"-Dprofile=release"
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user