mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-14 12:48:57 +00:00
stremio-linux-shell: 1.0.2 -> 1.1.2; install more files (#538322)
This commit is contained in:
42
pkgs/by-name/st/stremio-linux-shell/out-path.patch
Normal file
42
pkgs/by-name/st/stremio-linux-shell/out-path.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
diff --git a/build.rs b/build.rs
|
||||
index aa2bec5..d512a42 100644
|
||||
--- a/build.rs
|
||||
+++ b/build.rs
|
||||
@@ -26,7 +26,7 @@ fn setup_po() -> Result<()> {
|
||||
&& extension == "po"
|
||||
&& let Some(po_lang) = path.file_stem()
|
||||
{
|
||||
- let mo_dir = po_dir.join(po_lang).join("LC_MESSAGES");
|
||||
+ let mo_dir = Path::new("@out@/share/locale").join(po_lang).join("LC_MESSAGES");
|
||||
|
||||
fs::create_dir_all(&mo_dir)?;
|
||||
|
||||
@@ -46,7 +46,7 @@ fn setup_po() -> Result<()> {
|
||||
fn setup_schemas(filename: &str) -> Result<()> {
|
||||
println!("cargo:rerun-if-changed={DATA_DIR}");
|
||||
|
||||
- let out_dir = dirs::data_dir().expect("Failed to get data dir");
|
||||
+ let out_dir = Path::new("@out@/share");
|
||||
let out_dir = out_dir.join("glib-2.0/schemas");
|
||||
|
||||
fs::create_dir_all(&out_dir)?;
|
||||
diff --git a/data/com.stremio.Stremio.service b/data/com.stremio.Stremio.service
|
||||
index 7cfb139..7491969 100644
|
||||
--- a/data/com.stremio.Stremio.service
|
||||
+++ b/data/com.stremio.Stremio.service
|
||||
@@ -1,3 +1,3 @@
|
||||
[D-BUS Service]
|
||||
Name=com.stremio.Stremio
|
||||
-Exec=/app/bin/stremio --gapplication-service
|
||||
+Exec=@out@/bin/stremio --gapplication-service
|
||||
diff --git a/data/stremio.sh b/data/stremio.sh
|
||||
index 161bada..37373b0 100644
|
||||
--- a/data/stremio.sh
|
||||
+++ b/data/stremio.sh
|
||||
@@ -5,4 +5,4 @@ if ls /dev/nvidia0 &>/dev/null 2>&1; then
|
||||
export GSK_RENDERER=opengl
|
||||
fi
|
||||
|
||||
-exec /app/libexec/stremio/stremio "$@"
|
||||
\ No newline at end of file
|
||||
+exec @out@/libexec/stremio/stremio "$@"
|
||||
@@ -3,7 +3,7 @@
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
versionCheckHook,
|
||||
gitUpdater,
|
||||
nix-update-script,
|
||||
|
||||
# nativeBuildInputs
|
||||
pkg-config,
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "stremio-linux-shell";
|
||||
version = "1.0.2";
|
||||
version = "1.1.2";
|
||||
|
||||
strictDeps = true;
|
||||
__structuredAttrs = true;
|
||||
@@ -35,17 +35,18 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
owner = "Stremio";
|
||||
repo = "stremio-linux-shell";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-NbzUAv/L8xzdepqn677nlROumjlliZIHzPXIToHHeTU=";
|
||||
hash = "sha256-jo+9KDX/a46jPTmYhiFNgp5fDKhoAsML/+m7u3ituEQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-yafkD7D0E+lbFV7MlLwQM4iWC8Glo/Tn2F+TFff6GoM=";
|
||||
cargoHash = "sha256-hZ9neZD+aB7bth4UTsWJXIKGSbo/c3wZRtfOIp7LvwY=";
|
||||
|
||||
patches = [
|
||||
./out-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace data/com.stremio.Stremio.service \
|
||||
--replace-fail "Exec=/app/bin/stremio" "Exec=$out/bin/stremio"
|
||||
|
||||
substituteInPlace data/stremio.sh \
|
||||
--replace-fail "/app/libexec/stremio/stremio" "$out/libexec/stremio/stremio"
|
||||
substituteInPlace data/com.stremio.Stremio.service data/stremio.sh build.rs \
|
||||
--subst-var out
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -67,9 +68,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
postInstall = ''
|
||||
install -Dm644 data/icons/com.stremio.Stremio.svg $out/share/icons/hicolor/scalable/apps/com.stremio.Stremio.svg
|
||||
install -Dm644 data/com.stremio.Stremio.desktop $out/share/applications/com.stremio.Stremio.desktop
|
||||
install -Dm644 data/com.stremio.Stremio.metainfo.xml $out/share/metainfo/com.stremio.Stremio.metainfo.xml
|
||||
install -Dm644 data/com.stremio.Stremio.service $out/share/dbus-1/services/com.stremio.Stremio.service
|
||||
install -Dm644 data/server.js $out/libexec/stremio/server.js
|
||||
install -Dm755 data/stremio.sh $out/bin/stremio
|
||||
install -Dm644 LICENSE $out/share/licenses/stremio/LICENSE
|
||||
|
||||
mv $out/bin/stremio-linux-shell $out/libexec/stremio/stremio
|
||||
'';
|
||||
@@ -93,7 +96,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater { rev-prefix = "v"; };
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex=^v([0-9.]+)$" ];
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -111,7 +116,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
fromSource
|
||||
obfuscatedCode # server.js
|
||||
];
|
||||
maintainers = with lib.maintainers; [ thunze ];
|
||||
maintainers = with lib.maintainers; [
|
||||
thunze
|
||||
fazzi
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "stremio";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user