diff options
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/fx_cast/default.nix | 85 | ||||
-rw-r--r-- | pkgs/tools/misc/graylog/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/misc/starship/default.nix | 9 |
3 files changed, 90 insertions, 8 deletions
diff --git a/pkgs/tools/misc/fx_cast/default.nix b/pkgs/tools/misc/fx_cast/default.nix new file mode 100644 index 00000000000..5fa57e830d2 --- /dev/null +++ b/pkgs/tools/misc/fx_cast/default.nix @@ -0,0 +1,85 @@ +{ stdenv, fetchurl, dpkg }: + +stdenv.mkDerivation rec { + pname = "fx_cast_bridge"; + version = "0.0.5"; + + src = fetchurl { + url = "https://github.com/hensm/fx_cast/releases/download/v${version}/${pname}-${version}-x64.deb"; + sha256 = "1qmp1d7miq7c2q8i4bhfp5ywxdngvyi7rjl6i82is2g5nhr7gbvv"; + }; + + nativeBuildInputs = [ dpkg ]; + + unpackPhase = '' + runHook preUnpack + dpkg-deb -xv $src ./ + runHook postUnpack + ''; + + dontBuild = true; + dontPatchELF = true; + + installPhase = '' + install -DT {opt/fx_cast,$out/bin}/${pname} + install -DT {usr,$out}/lib/mozilla/native-messaging-hosts/${pname}.json + + substituteInPlace $out/lib/mozilla/native-messaging-hosts/${pname}.json \ + --replace {/opt/fx_cast,$out/bin}/${pname} + ''; + + # See now-cli/default.nix + dontStrip = true; + preFixup = let + libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc stdenv.cc.libc]; + bin = "$out/bin/${pname}"; + in '' + + orig_size=$(stat --printf=%s ${bin}) + + patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" ${bin} + patchelf --set-rpath ${libPath} ${bin} + chmod +x ${bin} + + new_size=$(stat --printf=%s ${bin}) + + ###### zeit-pkg fixing starts here. + # we're replacing plaintext js code that looks like + # PAYLOAD_POSITION = '1234 ' | 0 + # [...] + # PRELUDE_POSITION = '1234 ' | 0 + # ^-----20-chars-----^^------22-chars------^ + # ^-- grep points here + # + # var_* are as described above + # shift_by seems to be safe so long as all patchelf adjustments occur + # before any locations pointed to by hardcoded offsets + + var_skip=20 + var_select=22 + shift_by=$(expr $new_size - $orig_size) + + function fix_offset { + # $1 = name of variable to adjust + location=$(grep -obUam1 "$1" ${bin} | cut -d: -f1) + location=$(expr $location + $var_skip) + + value=$(dd if=${bin} iflag=count_bytes,skip_bytes skip=$location \ + bs=1 count=$var_select status=none) + value=$(expr $shift_by + $value) + + echo -n $value | dd of=${bin} bs=1 seek=$location conv=notrunc + } + + fix_offset PAYLOAD_POSITION + fix_offset PRELUDE_POSITION + + ''; + + meta = with stdenv.lib; { + description = "Implementation of the Chrome Sender API (Chromecast) within Firefox"; + homepage = https://hensm.github.io/fx_cast/; + license = licenses.mit; + maintainers = with maintainers; [ dtzWill ]; + }; +} diff --git a/pkgs/tools/misc/graylog/default.nix b/pkgs/tools/misc/graylog/default.nix index e331e43956e..48b471e3b40 100644 --- a/pkgs/tools/misc/graylog/default.nix +++ b/pkgs/tools/misc/graylog/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "graylog"; - version = "3.2.0"; + version = "3.2.1"; src = fetchurl { url = "https://packages.graylog2.org/releases/graylog/graylog-${version}.tgz"; - sha256 = "128hlk2m7dy1ajvxkkazbi2npx738jfrkkznvmhyxm0hllcw4r9z"; + sha256 = "1pilksik3bbd4sgmnpns9gg9sddybzxzxkn9sknn40dav08k1x6h"; }; dontBuild = true; diff --git a/pkgs/tools/misc/starship/default.nix b/pkgs/tools/misc/starship/default.nix index 0c0820837f5..338452e213c 100644 --- a/pkgs/tools/misc/starship/default.nix +++ b/pkgs/tools/misc/starship/default.nix @@ -3,13 +3,13 @@ rustPlatform.buildRustPackage rec { pname = "starship"; - version = "0.36.0"; + version = "0.36.1"; src = fetchFromGitHub { owner = "starship"; repo = pname; rev = "v${version}"; - sha256 = "0vkp6yfafzyhilkk5rfvgka91gmhm9nrrvy3m6gdza4ayslmcpam"; + sha256 = "1ip6jfnlw0maabvihzbmmka453njnw1yf7hq3fd89l6dx57315m5"; }; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ]; @@ -19,10 +19,7 @@ rustPlatform.buildRustPackage rec { --replace "/bin/echo" "echo" ''; - # Delete this on next update; see #79975 for details - legacyCargoFetcher = true; - - cargoSha256 = "05q527bd5q6a7kd03hwic4bynyc4sipyvi0bf2g2jqxzcsmswyyk"; + cargoSha256 = "16wsd8z4cfb5pplwfvwgi5qawwv8c0aa220wnvphplmgz8cpq35r"; checkPhase = "cargo test -- --skip directory::home_directory --skip directory::directory_in_root"; meta = with stdenv.lib; { |