diff options
author | Travis A. Everett <travis.a.everett@gmail.com> | 2023-08-03 20:29:24 -0500 |
---|---|---|
committer | Travis A. Everett <travis.a.everett@gmail.com> | 2023-08-03 22:39:24 -0500 |
commit | 3ea80c9c2c26ff0740fd29b30f04766dbca179de (patch) | |
tree | 7b4b45dbc21d264a9243252afb25d40ebd656e3d /pkgs/tools/cd-dvd | |
parent | 0271120180bfabe01bad1dc4163102e9204ea878 (diff) | |
download | nixpkgs-3ea80c9c2c26ff0740fd29b30f04766dbca179de.tar nixpkgs-3ea80c9c2c26ff0740fd29b30f04766dbca179de.tar.gz nixpkgs-3ea80c9c2c26ff0740fd29b30f04766dbca179de.tar.bz2 nixpkgs-3ea80c9c2c26ff0740fd29b30f04766dbca179de.tar.lz nixpkgs-3ea80c9c2c26ff0740fd29b30f04766dbca179de.tar.xz nixpkgs-3ea80c9c2c26ff0740fd29b30f04766dbca179de.tar.zst nixpkgs-3ea80c9c2c26ff0740fd29b30f04766dbca179de.zip |
srt-to-vtt-cl: fix macOS builds
The upstream Makefile is using logic to build into different dirs depending on uname output. Trivial to get macOS builds working if we just don't do that. I've also stripped out a use of substituteAll that was having no effect (the variables it replaced were removed during review of the initial PR.)
Diffstat (limited to 'pkgs/tools/cd-dvd')
-rw-r--r-- | pkgs/tools/cd-dvd/srt-to-vtt-cl/default.nix | 11 | ||||
-rw-r--r-- | pkgs/tools/cd-dvd/srt-to-vtt-cl/simplify-macOS-builds.patch | 31 |
2 files changed, 36 insertions, 6 deletions
diff --git a/pkgs/tools/cd-dvd/srt-to-vtt-cl/default.nix b/pkgs/tools/cd-dvd/srt-to-vtt-cl/default.nix index 70fcedde858..80e456d072c 100644 --- a/pkgs/tools/cd-dvd/srt-to-vtt-cl/default.nix +++ b/pkgs/tools/cd-dvd/srt-to-vtt-cl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, substituteAll }: +{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { pname = "srt-to-vtt-cl"; @@ -12,14 +12,13 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-validation.patch; - }) + ./fix-validation.patch + ./simplify-macOS-builds.patch ]; installPhase = '' mkdir -p $out/bin - cp bin/$(uname -s)/$(uname -m)/srt-vtt $out/bin + cp bin/srt-vtt $out/bin ''; meta = with lib; { @@ -27,6 +26,6 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ ericdallo ]; homepage = "https://github.com/nwoltman/srt-to-vtt-cl"; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/tools/cd-dvd/srt-to-vtt-cl/simplify-macOS-builds.patch b/pkgs/tools/cd-dvd/srt-to-vtt-cl/simplify-macOS-builds.patch new file mode 100644 index 00000000000..71497f23bee --- /dev/null +++ b/pkgs/tools/cd-dvd/srt-to-vtt-cl/simplify-macOS-builds.patch @@ -0,0 +1,31 @@ +From be08356f421825d3d2dd7ab687f86d9981a31f9a Mon Sep 17 00:00:00 2001 +From: "Travis A. Everett" <travis.a.everett@gmail.com> +Date: Thu, 3 Aug 2023 20:15:40 -0500 +Subject: [PATCH] simplify macOS builds + +--- + Makefile | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/Makefile b/Makefile +index 6dfd829..19c3ae3 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,13 +8,7 @@ CXXFLAGS = -std=c++11 -O2 -MMD -I ./deps + OBJECTS := src/text_encoding_detect.o src/Utils.o src/Converter.o src/main.o + DEPENDS := $(OBJECTS:.o=.d) + EXEC = srt-vtt +-UNAME_S := $(shell uname -s) +-ifeq ($(UNAME_S), Darwin) +- BIN_DIR = bin/Mac-OSX +-else +- UNAME_M := $(shell uname -m) +- BIN_DIR = bin/$(UNAME_S)/$(UNAME_M) +-endif ++BIN_DIR = bin + EXEC_PATH = $(BIN_DIR)/$(EXEC) + + .PHONY: test +-- +2.39.0 + |