Loading pkgs/by-name/fl/flare-signal/package.nix +8 −52 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ ninja, pkg-config, gst_all_1, openssl, protobuf, libspelling, libsecret, Loading @@ -16,57 +17,28 @@ gtksourceview5, rustPlatform, rustc, yq, appstream, blueprint-compiler, desktop-file-utils, wrapGAppsHook4, }: let presage = fetchFromGitHub { owner = "whisperfish"; repo = "presage"; # match with commit from Cargo.toml rev = "559591c0e5886f101d3c25c27d8010214e9ea0c3"; hash = "sha256-WEWVhG/azf9BjLLzTEys+JGWbd+FzIDHm9QeWAeMLGA="; }; in stdenv.mkDerivation (finalAttrs: { pname = "flare"; # NOTE: also update presage commit version = "0.17.3"; version = "0.17.4"; src = fetchFromGitLab { domain = "gitlab.com"; owner = "schmiddi-on-mobile"; repo = "flare"; tag = finalAttrs.version; hash = "sha256-W26RR4BmGeXL6AoWMkf9BmU3nLY4rTnVf2OJPWKmKYc="; hash = "sha256-GW7v5ZsVPqQ+hZLOB0A/wVbOQHA9OgGCfeSONCNPKhk="; }; cargoDeps = let cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; hash = "sha256-bpafm+yyHNAoHVAgzc3BgM3+Jm7L+2gdoOdRSJ05iTE="; hash = "sha256-CGgoHL6dDovBe1W04A8fOH5EnkqezPuiO8f7/ZCgjAM="; }; in # Replace with simpler solution: # https://github.com/NixOS/nixpkgs/pull/432651#discussion_r2312796706 # depending on sqlx release and update in flare-signal runCommand "${finalAttrs.pname}-${finalAttrs.version}-vendor-patched" { inherit cargoDeps; } # https://github.com/flathub/de.schmidhuberj.Flare/commit/b1352087beaf299569c798bc69e31660712853db # bash '' mkdir $out find $cargoDeps -maxdepth 1 -exec sh -c "ln -s {} $out/\$(basename {})" \; rm $out/presage-store-sqlite-* cp -r $cargoDeps/presage-store-sqlite-* $out chmod +w $out/presage-store-sqlite-* ln -s ${presage}/.sqlx $out/presage-store-sqlite-* ''; nativeBuildInputs = [ appstream # for appstream-util Loading @@ -79,30 +51,14 @@ stdenv.mkDerivation (finalAttrs: { rustPlatform.cargoSetupHook cargo rustc # yq contains tomlq yq ]; postPatch = '' cargoPresageRev="$(tomlq -r '.dependencies.presage.rev' Cargo.toml)" actualPresageRev="${presage.rev}" if [ "$cargoPresageRev" != "$actualPresageRev" ]; then echo "" echo "fetchFromGitHub presage revision does not match revision specified in Cargo.toml" echo "consider replacing fetchFromGitHub's revision with revision specified in Cargo.toml" echo "" echo " fetchFromGitHub = ''${actualPresageRev}" echo " Cargo.toml = ''${cargoPresageRev}" echo "" exit 1 fi ''; buildInputs = [ gtksourceview5 libadwaita libsecret libspelling openssl protobuf # To reproduce audio messages Loading Loading
pkgs/by-name/fl/flare-signal/package.nix +8 −52 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ ninja, pkg-config, gst_all_1, openssl, protobuf, libspelling, libsecret, Loading @@ -16,57 +17,28 @@ gtksourceview5, rustPlatform, rustc, yq, appstream, blueprint-compiler, desktop-file-utils, wrapGAppsHook4, }: let presage = fetchFromGitHub { owner = "whisperfish"; repo = "presage"; # match with commit from Cargo.toml rev = "559591c0e5886f101d3c25c27d8010214e9ea0c3"; hash = "sha256-WEWVhG/azf9BjLLzTEys+JGWbd+FzIDHm9QeWAeMLGA="; }; in stdenv.mkDerivation (finalAttrs: { pname = "flare"; # NOTE: also update presage commit version = "0.17.3"; version = "0.17.4"; src = fetchFromGitLab { domain = "gitlab.com"; owner = "schmiddi-on-mobile"; repo = "flare"; tag = finalAttrs.version; hash = "sha256-W26RR4BmGeXL6AoWMkf9BmU3nLY4rTnVf2OJPWKmKYc="; hash = "sha256-GW7v5ZsVPqQ+hZLOB0A/wVbOQHA9OgGCfeSONCNPKhk="; }; cargoDeps = let cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; hash = "sha256-bpafm+yyHNAoHVAgzc3BgM3+Jm7L+2gdoOdRSJ05iTE="; hash = "sha256-CGgoHL6dDovBe1W04A8fOH5EnkqezPuiO8f7/ZCgjAM="; }; in # Replace with simpler solution: # https://github.com/NixOS/nixpkgs/pull/432651#discussion_r2312796706 # depending on sqlx release and update in flare-signal runCommand "${finalAttrs.pname}-${finalAttrs.version}-vendor-patched" { inherit cargoDeps; } # https://github.com/flathub/de.schmidhuberj.Flare/commit/b1352087beaf299569c798bc69e31660712853db # bash '' mkdir $out find $cargoDeps -maxdepth 1 -exec sh -c "ln -s {} $out/\$(basename {})" \; rm $out/presage-store-sqlite-* cp -r $cargoDeps/presage-store-sqlite-* $out chmod +w $out/presage-store-sqlite-* ln -s ${presage}/.sqlx $out/presage-store-sqlite-* ''; nativeBuildInputs = [ appstream # for appstream-util Loading @@ -79,30 +51,14 @@ stdenv.mkDerivation (finalAttrs: { rustPlatform.cargoSetupHook cargo rustc # yq contains tomlq yq ]; postPatch = '' cargoPresageRev="$(tomlq -r '.dependencies.presage.rev' Cargo.toml)" actualPresageRev="${presage.rev}" if [ "$cargoPresageRev" != "$actualPresageRev" ]; then echo "" echo "fetchFromGitHub presage revision does not match revision specified in Cargo.toml" echo "consider replacing fetchFromGitHub's revision with revision specified in Cargo.toml" echo "" echo " fetchFromGitHub = ''${actualPresageRev}" echo " Cargo.toml = ''${cargoPresageRev}" echo "" exit 1 fi ''; buildInputs = [ gtksourceview5 libadwaita libsecret libspelling openssl protobuf # To reproduce audio messages Loading