uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
25
pkgs/tools/cd-dvd/bchunk/default.nix
Normal file
25
pkgs/tools/cd-dvd/bchunk/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bchunk";
|
||||
version = "1.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://he.fi/bchunk/${pname}-${version}.tar.gz";
|
||||
sha256 = "12dxx98kbpc5z4dgni25280088bhlsb677rp832r82zzc1drpng7";
|
||||
};
|
||||
|
||||
makeFlags = lib.optionals stdenv.cc.isClang [ "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dt $out/bin bchunk
|
||||
install -Dt $out/share/man/man1 bchunk.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://he.fi/bchunk/";
|
||||
description = "A program that converts CD images in BIN/CUE format into a set of ISO and CDR tracks";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/cd-dvd/bootiso/default.nix
Normal file
47
pkgs/tools/cd-dvd/bootiso/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, bash
|
||||
, makeWrapper
|
||||
, bc
|
||||
, jq
|
||||
, coreutils
|
||||
, util-linux
|
||||
, wimlib
|
||||
, file
|
||||
, syslinux
|
||||
, busybox
|
||||
, gnugrep # We can't use busybox's 'grep' as it doesn't support perl '-P' expressions.
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "bootiso";
|
||||
version = "4.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jsamr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1l09d543b73r0wbpsj5m6kski8nq48lbraq1myxhidkgl3mm3d5i";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ bash ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
makeFlags = [ "prefix=${placeholder "out"}" ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/bootiso \
|
||||
--prefix PATH : ${lib.makeBinPath [ bc jq coreutils util-linux wimlib file syslinux gnugrep busybox ]} \
|
||||
--prefix BOOTISO_SYSLINUX_LIB_ROOT : ${syslinux}/share/syslinux
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Script for securely creating a bootable USB device from one image file";
|
||||
homepage = "https://github.com/jsamr/bootiso";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ muscaln ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
49
pkgs/tools/cd-dvd/brasero/default.nix
Normal file
49
pkgs/tools/cd-dvd/brasero/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ stdenv, lib, fetchurl, pkg-config, gtk3, itstool, gst_all_1, libxml2, libnotify
|
||||
, libcanberra-gtk3, intltool, dvdauthor, libburn, libisofs
|
||||
, vcdimager, wrapGAppsHook, hicolor-icon-theme }:
|
||||
|
||||
let
|
||||
major = "3.12";
|
||||
minor = "3";
|
||||
binpath = lib.makeBinPath [ dvdauthor vcdimager ];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "${major}.${minor}";
|
||||
pname = "brasero";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/brasero/${major}/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-h3SerjOhQSB9GwC+IzttgEWYLtMkntS5ja4fOpdf6hU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config itstool intltool wrapGAppsHook ];
|
||||
|
||||
buildInputs = [ gtk3 libxml2 libnotify libcanberra-gtk3 libburn libisofs
|
||||
hicolor-icon-theme
|
||||
gst_all_1.gstreamer gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-ugly gst_all_1.gst-libav ];
|
||||
|
||||
# brasero checks that the applications it uses aren't symlinks, but this
|
||||
# will obviously not work on nix
|
||||
patches = [ ./remove-symlink-check.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-girdir=$out/share/gir-1.0"
|
||||
"--with-typelibdir=$out/lib/girepository-1.0"
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(--prefix PATH : "${binpath}")
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Gnome CD/DVD Burner";
|
||||
homepage = "https://wiki.gnome.org/Apps/Brasero";
|
||||
maintainers = [ maintainers.bdimcheff ];
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/cd-dvd/brasero/remove-symlink-check.patch
Normal file
29
pkgs/tools/cd-dvd/brasero/remove-symlink-check.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/libbrasero-burn/burn-plugin.c b/libbrasero-burn/burn-plugin.c
|
||||
index f97bc5f..88e9d35 100644
|
||||
--- a/libbrasero-burn/burn-plugin.c
|
||||
+++ b/libbrasero-burn/burn-plugin.c
|
||||
@@ -221,21 +221,10 @@ brasero_plugin_test_app (BraseroPlugin *plugin,
|
||||
return;
|
||||
}
|
||||
|
||||
- /* make sure that's not a symlink pointing to something with another
|
||||
- * name like wodim.
|
||||
- * NOTE: we used to test the target and see if it had the same name as
|
||||
- * the symlink with GIO. The problem is, when the symlink pointed to
|
||||
- * another symlink, then GIO didn't follow that other symlink. And in
|
||||
- * the end it didn't work. So forbid all symlink. */
|
||||
- if (g_file_test (prog_path, G_FILE_TEST_IS_SYMLINK)) {
|
||||
- brasero_plugin_add_error (plugin,
|
||||
- BRASERO_PLUGIN_ERROR_SYMBOLIC_LINK_APP,
|
||||
- name);
|
||||
- g_free (prog_path);
|
||||
- return;
|
||||
- }
|
||||
+ /* disable symlink check on nixos */
|
||||
+
|
||||
/* Make sure it's a regular file */
|
||||
- else if (!g_file_test (prog_path, G_FILE_TEST_IS_REGULAR)) {
|
||||
+ if (!g_file_test (prog_path, G_FILE_TEST_IS_REGULAR)) {
|
||||
brasero_plugin_add_error (plugin,
|
||||
BRASERO_PLUGIN_ERROR_MISSING_APP,
|
||||
name);
|
||||
18
pkgs/tools/cd-dvd/brasero/wrapper.nix
Normal file
18
pkgs/tools/cd-dvd/brasero/wrapper.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, symlinkJoin, brasero-original, cdrtools, libdvdcss, makeWrapper }:
|
||||
|
||||
let
|
||||
binPath = lib.makeBinPath [ cdrtools ];
|
||||
in symlinkJoin {
|
||||
name = "brasero-${brasero-original.version}";
|
||||
|
||||
paths = [ brasero-original ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/brasero \
|
||||
--prefix PATH ':' ${binPath} \
|
||||
--prefix LD_PRELOAD : ${lib.makeLibraryPath [ libdvdcss ]}/libdvdcss.so
|
||||
'';
|
||||
|
||||
inherit (brasero-original) meta;
|
||||
}
|
||||
19
pkgs/tools/cd-dvd/ccd2iso/default.nix
Normal file
19
pkgs/tools/cd-dvd/ccd2iso/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ccd2iso";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ccd2iso/ccd2iso-${version}.tar.gz";
|
||||
sha256 = "1z000zi7hpr2h9cabj6hzf3n6a6gd6glmm8nn36v4b8i4vzbhx7q";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "CloneCD to ISO converter";
|
||||
homepage = "https://sourceforge.net/projects/ccd2iso/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ yana ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/cd-dvd/cdi2iso/default.nix
Normal file
28
pkgs/tools/cd-dvd/cdi2iso/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cdi2iso";
|
||||
version = "0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/cdi2iso.berlios/${pname}-${version}-src.tar.gz";
|
||||
sha256 = "0fj2fxhpr26z649m0ph71378c41ljflpyk89g87x8r1mc4rbq3kh";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp cdi2iso $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A very simple utility for converting DiscJuggler images to the standard ISO-9660 format";
|
||||
homepage = "https://sourceforge.net/projects/cdi2iso.berlios";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ hrdinka ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/cd-dvd/cdimgtools/default.nix
Normal file
36
pkgs/tools/cd-dvd/cdimgtools/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromRepoOrCz, autoreconfHook, makeWrapper, libdvdcss, libdvdread, perl, perlPackages, asciidoc, xmlto, sourceHighlight, docbook_xsl, docbook_xml_dtd_45 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "cdimgtools";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchFromRepoOrCz {
|
||||
repo = "cdimgtools";
|
||||
rev = "version/0.3";
|
||||
sha256 = "1hxg3glxj26fh9xnv184sfdc2wi4cnzvn7chz47wcqdsd0d5fn8w";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook makeWrapper asciidoc perlPackages.PodPerldoc xmlto sourceHighlight docbook_xsl docbook_xml_dtd_45 ];
|
||||
|
||||
buildInputs = [ perl perlPackages.StringEscape perlPackages.DataHexdumper libdvdcss libdvdread ];
|
||||
|
||||
patches = [ ./nrgtool_fix_my.patch ./removed_dvdcss_interface_2.patch];
|
||||
|
||||
postFixup = ''
|
||||
for cmd in raw96cdconv nrgtool; do
|
||||
wrapProgram "$out/bin/$cmd" --prefix PERL5LIB : "$PERL5LIB"
|
||||
done
|
||||
'';
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
installTargets = [ "install" "install-doc" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://repo.or.cz/cdimgtools.git/blob_plain/refs/heads/release:/README.html";
|
||||
description = "Tools to inspect and manipulate CD/DVD optical disc images";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ hhm ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
12
pkgs/tools/cd-dvd/cdimgtools/nrgtool_fix_my.patch
Normal file
12
pkgs/tools/cd-dvd/cdimgtools/nrgtool_fix_my.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Fixes an error in nrgtool.
|
||||
--- a/nrgtool
|
||||
+++ b/nrgtool
|
||||
@@ -162,7 +162,7 @@ sub process_file {
|
||||
}
|
||||
seek $nrg, 0, SEEK_SET if ($iff_only);
|
||||
seek $nrg, $offset, SEEK_SET unless ($iff_only);
|
||||
- while (my $_ = read_chunk($nrg, $iff)) {
|
||||
+ while ($_ = read_chunk($nrg, $iff)) {
|
||||
if ($_ < -1) {
|
||||
warn "ERROR while reading an IFF chunk; aborting\n";
|
||||
return;
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
Removes the deprecated and removed `dvdcss_interface_2` libdvdcss function.
|
||||
|
||||
This does not change any functionality; it only modifies the printing of software version information.
|
||||
--- a/cssdec.c
|
||||
+++ b/cssdec.c
|
||||
@@ -102,8 +102,8 @@ int main( int argc, char *argv[] )
|
||||
b_keyonly = 1;
|
||||
break;
|
||||
case 'V':
|
||||
- printf( "%s version %s (libdvdcss version %s)\n",
|
||||
- progname, progversion, dvdcss_interface_2 );
|
||||
+ printf( "%s version %s\n",
|
||||
+ progname, progversion );
|
||||
exit( EX_SUCCESS );
|
||||
break;
|
||||
case '?':
|
||||
@@ -126,8 +126,8 @@ int main( int argc, char *argv[] )
|
||||
if( argc >= 3 ) end = (int)strtol( argv[2], (char **)NULL, 0 );
|
||||
|
||||
/* Initialize libdvdcss */
|
||||
- printe( 2, "%s version %s (libdvdcss version %s)",
|
||||
- progname, progversion, dvdcss_interface_2 );
|
||||
+ printe( 2, "%s version %s",
|
||||
+ progname, progversion );
|
||||
dvdcss = dvdcss_open( (char *)dvdfile );
|
||||
if( dvdcss == NULL )
|
||||
{
|
||||
diff --git a/dvdimgdecss.c b/dvdimgdecss.c
|
||||
index 0b7006d..b7d251a 100644
|
||||
--- a/dvdimgdecss.c
|
||||
+++ b/dvdimgdecss.c
|
||||
@@ -157,8 +157,8 @@ int main( int argc, char *argv[] )
|
||||
dvdread_decrypt = 1;
|
||||
break;
|
||||
case 'V':
|
||||
- printf( "%s version %s (libdvdcss version %s)\n",
|
||||
- progname, progversion, dvdcss_interface_2 );
|
||||
+ printf( "%s version %s\n",
|
||||
+ progname, progversion );
|
||||
exit( EX_SUCCESS );
|
||||
break;
|
||||
case '?':
|
||||
@@ -180,8 +180,8 @@ int main( int argc, char *argv[] )
|
||||
if( !imgfile ) verbosity++;
|
||||
|
||||
/* Open the DVD */
|
||||
- printe( 2, "%s: version %s (libdvdcss version %s)\n",
|
||||
- progname, progversion, dvdcss_interface_2 );
|
||||
+ printe( 2, "%s: version %s\n",
|
||||
+ progname, progversion );
|
||||
dvdcss = dvdcss_open( dvdfile );
|
||||
if( dvdcss == NULL ) {
|
||||
printe( 1, "opening of the DVD (%s) with libdvdcss failed\n", dvdfile );
|
||||
15
pkgs/tools/cd-dvd/cdrdao/adjust-includes-for-glibc-212.patch
Normal file
15
pkgs/tools/cd-dvd/cdrdao/adjust-includes-for-glibc-212.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Adjust some headers for glibc 2.12 compatibility.
|
||||
Patch is a diff between the 1.2.3 release and CVS HEAD.
|
||||
|
||||
--- cdrdao-1.2.3/dao/ScsiIf-linux.cc 2009-09-28 05:42:03.000000000 -0430
|
||||
+++ /home/kkallio/q/src/r/cvs/cdrdao/cdrdao/dao/ScsiIf-linux.cc 2010-08-06 07:50:46.000000000 -0430
|
||||
@@ -19,6 +19,9 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
38
pkgs/tools/cd-dvd/cdrdao/default.nix
Normal file
38
pkgs/tools/cd-dvd/cdrdao/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{lib, stdenv, fetchurl, libvorbis, libmad, pkg-config, libao}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cdrdao";
|
||||
version = "1.2.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/cdrdao/cdrdao-${version}.tar.bz2";
|
||||
sha256 = "0pmpgx91j984snrsxbq1dgf3ximks2dfh1sqqmic72lrls7wp4w1";
|
||||
};
|
||||
|
||||
makeFlags = [ "RM=rm" "LN=ln" "MV=mv" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libvorbis libmad libao ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
# Adjust some headers to match glibc 2.12 ... patch is a diff between
|
||||
# the cdrdao CVS head and the 1.2.3 release.
|
||||
patches = [ ./adjust-includes-for-glibc-212.patch ];
|
||||
|
||||
# we have glibc/include/linux as a symlink to the kernel headers,
|
||||
# and the magic '..' points to kernelheaders, and not back to the glibc/include
|
||||
postPatch = ''
|
||||
sed -i 's,linux/../,,g' dao/sg_err.h
|
||||
'';
|
||||
|
||||
# Needed on gcc >= 6.
|
||||
NIX_CFLAGS_COMPILE = "-Wno-narrowing";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
|
||||
homepage = "http://cdrdao.sourceforge.net/";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
11
pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.11-fno-common.patch
Normal file
11
pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.11-fno-common.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/genisoimage/genisoimage.h
|
||||
+++ b/genisoimage/genisoimage.h
|
||||
@@ -377,7 +377,7 @@ extern int use_fileversion;
|
||||
extern int split_SL_component;
|
||||
extern int split_SL_field;
|
||||
extern char *trans_tbl;
|
||||
-char *outfile;
|
||||
+extern char *outfile;
|
||||
|
||||
#define JMAX 64 /* maximum Joliet file name length (spec) */
|
||||
#define JLONGMAX 103 /* out of spec Joliet file name length */
|
||||
204
pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.9-efi-boot.patch
Normal file
204
pkgs/tools/cd-dvd/cdrkit/cdrkit-1.1.9-efi-boot.patch
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
diff --git a/doc/icedax/tracknames.pl b/doc/icedax/tracknames.pl
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index 09f0fcf..801b89e
|
||||
--- a/doc/icedax/tracknames.pl
|
||||
+++ b/doc/icedax/tracknames.pl
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/perl
|
||||
+#!/usr/bin/perl
|
||||
# A quick perl hack to get rename files pulled in with icedax.
|
||||
# by billo@billo.com
|
||||
#
|
||||
diff --git a/genisoimage/eltorito.c b/genisoimage/eltorito.c
|
||||
index b97bdf1..5d7c2d1 100644
|
||||
--- a/genisoimage/eltorito.c
|
||||
+++ b/genisoimage/eltorito.c
|
||||
@@ -59,7 +59,7 @@ static void get_torito_desc(struct eltorito_boot_descriptor *boot_desc);
|
||||
static void fill_boot_desc(struct eltorito_defaultboot_entry *boot_desc_entry,
|
||||
struct eltorito_boot_entry_info *boot_entry);
|
||||
void get_boot_entry(void);
|
||||
-void new_boot_entry(void);
|
||||
+void new_boot_entry();
|
||||
static int tvd_write(FILE *outfile);
|
||||
|
||||
|
||||
@@ -283,6 +283,7 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc)
|
||||
int i;
|
||||
int offset;
|
||||
struct eltorito_defaultboot_entry boot_desc_record;
|
||||
+ struct eltorito_sectionheader_entry section_header;
|
||||
|
||||
memset(boot_desc, 0, sizeof (*boot_desc));
|
||||
boot_desc->type[0] = 0;
|
||||
@@ -317,7 +318,7 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc)
|
||||
*/
|
||||
memset(&valid_desc, 0, sizeof (valid_desc));
|
||||
valid_desc.headerid[0] = 1;
|
||||
- valid_desc.arch[0] = EL_TORITO_ARCH_x86;
|
||||
+ valid_desc.arch[0] = first_boot_entry->arch;
|
||||
|
||||
/*
|
||||
* we'll shove start of publisher id into id field,
|
||||
@@ -347,10 +348,53 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc)
|
||||
/* now write it to the virtual boot catalog */
|
||||
memcpy(de2->table, &valid_desc, 32);
|
||||
|
||||
- for (current_boot_entry = first_boot_entry, offset = sizeof (valid_desc);
|
||||
- current_boot_entry != NULL;
|
||||
- current_boot_entry = current_boot_entry->next,
|
||||
- offset += sizeof (boot_desc_record)) {
|
||||
+ /* Fill the first entry, since it's special and already has the
|
||||
+ * matching header via the validation header... */
|
||||
+ offset = sizeof (valid_desc);
|
||||
+ current_boot_entry = first_boot_entry;
|
||||
+
|
||||
+ if (offset >= SECTOR_SIZE) {
|
||||
+#ifdef USE_LIBSCHILY
|
||||
+ comerrno(EX_BAD, "Too many El Torito boot entries\n");
|
||||
+#else
|
||||
+ fprintf(stderr, "Too many El Torito boot entries\n");
|
||||
+ exit(1);
|
||||
+#endif
|
||||
+ }
|
||||
+ fill_boot_desc(&boot_desc_record, current_boot_entry);
|
||||
+ memcpy(de2->table + offset, &boot_desc_record,
|
||||
+ sizeof (boot_desc_record));
|
||||
+
|
||||
+ offset += sizeof(boot_desc_record);
|
||||
+
|
||||
+ for (current_boot_entry = current_boot_entry->next;
|
||||
+ current_boot_entry != NULL;
|
||||
+ current_boot_entry = current_boot_entry->next) {
|
||||
+ struct eltorito_sectionheader_entry section_header;
|
||||
+
|
||||
+ if (offset >= SECTOR_SIZE) {
|
||||
+#ifdef USE_LIBSCHILY
|
||||
+ comerrno(EX_BAD,
|
||||
+ "Too many El Torito boot entries\n");
|
||||
+#else
|
||||
+ fprintf(stderr,
|
||||
+ "Too many El Torito boot entries\n");
|
||||
+ exit(1);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ memset(§ion_header, '\0', sizeof(section_header));
|
||||
+ if (current_boot_entry->next)
|
||||
+ section_header.headerid[0] = EL_TORITO_SECTION_HEADER;
|
||||
+ else
|
||||
+ section_header.headerid[0] = EL_TORITO_LAST_SECTION_HEADER;
|
||||
+
|
||||
+ section_header.arch[0] = current_boot_entry->arch;
|
||||
+ set_721(section_header.num_entries, 1);
|
||||
+
|
||||
+ memcpy(de2->table + offset, §ion_header,
|
||||
+ sizeof(section_header));
|
||||
+ offset += sizeof(section_header);
|
||||
|
||||
if (offset >= SECTOR_SIZE) {
|
||||
#ifdef USE_LIBSCHILY
|
||||
@@ -365,6 +409,8 @@ get_torito_desc(struct eltorito_boot_descriptor *boot_desc)
|
||||
fill_boot_desc(&boot_desc_record, current_boot_entry);
|
||||
memcpy(de2->table + offset, &boot_desc_record,
|
||||
sizeof (boot_desc_record));
|
||||
+ offset += sizeof (boot_desc_record);
|
||||
+
|
||||
}
|
||||
}/* get_torito_desc(... */
|
||||
|
||||
diff --git a/genisoimage/genisoimage.c b/genisoimage/genisoimage.c
|
||||
index a5b0b46..8add1ac 100644
|
||||
--- a/genisoimage/genisoimage.c
|
||||
+++ b/genisoimage/genisoimage.c
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
#include <mconfig.h>
|
||||
#include "genisoimage.h"
|
||||
+#include "iso9660.h"
|
||||
#include <errno.h>
|
||||
#include <timedefs.h>
|
||||
#include <fctldefs.h>
|
||||
@@ -523,6 +524,8 @@ static const struct ld_option ld_options[] =
|
||||
'\0', NULL, "Set debug flag", ONE_DASH},
|
||||
{{"eltorito-boot", required_argument, NULL, 'b'},
|
||||
'b', "FILE", "Set El Torito boot image name", ONE_DASH},
|
||||
+ {{"efi-boot", required_argument, NULL, 'e'},
|
||||
+ 'e', "FILE", "Set EFI boot image name", ONE_DASH},
|
||||
{{"eltorito-alt-boot", no_argument, NULL, OPTION_ALT_BOOT},
|
||||
'\0', NULL, "Start specifying alternative El Torito boot parameters", ONE_DASH},
|
||||
{{"sparc-boot", required_argument, NULL, 'B'},
|
||||
@@ -1502,6 +1505,7 @@ int main(int argc, char *argv[])
|
||||
all_files = 0;
|
||||
break;
|
||||
case 'b':
|
||||
+ case 'e':
|
||||
do_sort++; /* We sort bootcat/botimage */
|
||||
use_eltorito++;
|
||||
boot_image = optarg; /* pathname of the boot image */
|
||||
@@ -1517,6 +1521,10 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
}
|
||||
get_boot_entry();
|
||||
+ if (c == 'e')
|
||||
+ current_boot_entry->arch = EL_TORITO_ARCH_EFI;
|
||||
+ else
|
||||
+ current_boot_entry->arch = EL_TORITO_ARCH_x86;
|
||||
current_boot_entry->boot_image = boot_image;
|
||||
break;
|
||||
case OPTION_ALT_BOOT:
|
||||
diff --git a/genisoimage/genisoimage.h b/genisoimage/genisoimage.h
|
||||
index bbedfb0..76e5e21 100644
|
||||
--- a/genisoimage/genisoimage.h
|
||||
+++ b/genisoimage/genisoimage.h
|
||||
@@ -293,6 +293,7 @@ struct deferred_write {
|
||||
struct eltorito_boot_entry_info {
|
||||
struct eltorito_boot_entry_info *next;
|
||||
char *boot_image;
|
||||
+ char arch;
|
||||
int not_bootable;
|
||||
int no_emul_boot;
|
||||
int hard_disk_boot;
|
||||
diff --git a/genisoimage/iso9660.h b/genisoimage/iso9660.h
|
||||
index c74c2a9..c8b7a05 100644
|
||||
--- a/genisoimage/iso9660.h
|
||||
+++ b/genisoimage/iso9660.h
|
||||
@@ -62,10 +62,14 @@ struct iso_volume_descriptor {
|
||||
#define EL_TORITO_ARCH_x86 0
|
||||
#define EL_TORITO_ARCH_PPC 1
|
||||
#define EL_TORITO_ARCH_MAC 2
|
||||
+#define EL_TORITO_ARCH_EFI 0xef
|
||||
|
||||
#define EL_TORITO_BOOTABLE 0x88
|
||||
#define EL_TORITO_NOT_BOOTABLE 0
|
||||
|
||||
+#define EL_TORITO_SECTION_HEADER 0x90
|
||||
+#define EL_TORITO_LAST_SECTION_HEADER 0x91
|
||||
+
|
||||
#define EL_TORITO_MEDIA_NOEMUL 0
|
||||
#define EL_TORITO_MEDIA_12FLOP 1
|
||||
#define EL_TORITO_MEDIA_144FLOP 2
|
||||
@@ -173,7 +177,7 @@ struct eltorito_validation_entry {
|
||||
struct eltorito_defaultboot_entry {
|
||||
char boot_id [ISODCL(1, 1)]; /* 711 */
|
||||
char boot_media [ISODCL(2, 2)];
|
||||
- char loadseg [ISODCL(3, 4)]; /* 711 */
|
||||
+ char loadseg [ISODCL(3, 4)]; /* 712 */
|
||||
char sys_type [ISODCL(5, 5)];
|
||||
char pad1 [ISODCL(6, 6)];
|
||||
char nsect [ISODCL(7, 8)];
|
||||
@@ -181,6 +185,14 @@ struct eltorito_defaultboot_entry {
|
||||
char pad2 [ISODCL(13, 32)];
|
||||
};
|
||||
|
||||
+/* El Torito Section Header Entry in boot catalog */
|
||||
+struct eltorito_sectionheader_entry {
|
||||
+ char headerid [ISODCL(1, 1)]; /* 711 */
|
||||
+ char arch [ISODCL(2, 2)];
|
||||
+ char num_entries [ISODCL(3, 4)]; /* 711 */
|
||||
+ char id [ISODCL(5, 32)];
|
||||
+};
|
||||
+
|
||||
/*
|
||||
* XXX JS: The next two structures have odd lengths!
|
||||
* Some compilers (e.g. on Sun3/mc68020) padd the structures to even length.
|
||||
48
pkgs/tools/cd-dvd/cdrkit/default.nix
Normal file
48
pkgs/tools/cd-dvd/cdrkit/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{lib, stdenv, fetchurl, cmake, libcap, zlib, bzip2, perl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cdrkit";
|
||||
version = "1.1.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://cdrkit.org/releases/cdrkit-${version}.tar.gz";
|
||||
sha256 = "1nj7iv3xrq600i37na9a5idd718piiiqbs4zxvpjs66cdrsk1h6i";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libcap zlib bzip2 perl ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
# efi-boot-patch extracted from http://arm.koji.fedoraproject.org/koji/rpminfo?rpmID=174244
|
||||
patches = [ ./include-path.patch ./cdrkit-1.1.9-efi-boot.patch ./cdrkit-1.1.11-fno-common.patch ];
|
||||
|
||||
postInstall = ''
|
||||
# file name compatibility with the old cdrecord (growisofs wants this name)
|
||||
ln -s $out/bin/genisoimage $out/bin/mkisofs
|
||||
ln -s $out/bin/wodim $out/bin/cdrecord
|
||||
'';
|
||||
|
||||
cmakeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "-DBITFIELDS_HTOL=0" ];
|
||||
|
||||
makeFlags = [ "PREFIX=\$(out)" ];
|
||||
|
||||
meta = {
|
||||
description = "Portable command-line CD/DVD recorder software, mostly compatible with cdrtools";
|
||||
|
||||
longDescription = ''
|
||||
Cdrkit is a suite of programs for recording CDs and DVDs,
|
||||
blanking CD-RW media, creating ISO-9660 filesystem images,
|
||||
extracting audio CD data, and more. The programs included in
|
||||
the cdrkit package were originally derived from several sources,
|
||||
most notably mkisofs by Eric Youngdale and others, cdda2wav by
|
||||
Heiko Eissfeldt, and cdrecord by Jörg Schilling. However,
|
||||
cdrkit is not affiliated with any of these authors; it is now an
|
||||
independent project.
|
||||
'';
|
||||
|
||||
homepage = "http://cdrkit.org/";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
9
pkgs/tools/cd-dvd/cdrkit/include-path.patch
Normal file
9
pkgs/tools/cd-dvd/cdrkit/include-path.patch
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 57edba6..d06b6d9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,3 +1,4 @@
|
||||
PROJECT (cdrkit C)
|
||||
+INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include)
|
||||
SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit)
|
||||
|
||||
41
pkgs/tools/cd-dvd/cdrtools/default.nix
Normal file
41
pkgs/tools/cd-dvd/cdrtools/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv, fetchurl, m4, acl, libcap, Carbon, IOKit }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cdrtools";
|
||||
version = "3.02a09";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/cdrtools/${pname}-${version}.tar.bz2";
|
||||
sha256 = "10ayj48jax2pvsv6j5gybwfsx7b74zdjj84znwag7wwf8n7l6a5a";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ m4 ];
|
||||
buildInputs = if stdenv.isDarwin then [ Carbon IOKit ] else [ acl libcap ];
|
||||
|
||||
postPatch = ''
|
||||
sed "/\.mk3/d" -i libschily/Targets.man
|
||||
substituteInPlace man/Makefile --replace "man4" ""
|
||||
substituteInPlace RULES/rules.prg --replace "/bin/" ""
|
||||
'' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
|
||||
ln -sv i386-darwin-clang64.rul RULES/arm64-darwin-cc.rul
|
||||
ln -sv i386-darwin-clang64.rul RULES/arm64-darwin-clang.rul
|
||||
ln -sv i386-darwin-clang64.rul RULES/arm64-darwin-clang64.rul
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
makeFlags = [ "GMAKE_NOWARN=true" "INS_BASE=/" "INS_RBASE=/" "DESTDIR=${placeholder "out"}" ];
|
||||
|
||||
enableParallelBuilding = false; # parallel building fails on some linux machines
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://cdrtools.sourceforge.net/private/cdrecord.html";
|
||||
description = "Highly portable CD/DVD/BluRay command line recording software";
|
||||
license = with licenses; [ cddl gpl2 lgpl21 ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
# Licensing issues: This package contains code licensed under CDDL, GPL2
|
||||
# and LGPL2. There is a debate regarding the legality of distributing this
|
||||
# package in binary form.
|
||||
hydraPlatforms = [];
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/cd-dvd/cue2pops/default.nix
Normal file
32
pkgs/tools/cd-dvd/cue2pops/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "cue2pops";
|
||||
version = "unstable-2018-01-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "makefu";
|
||||
repo = "cue2pops-linux";
|
||||
rev = "541863adf23fdecde92eba5899f8d58586ca4551";
|
||||
sha256 = "05w84726g3k33rz0wwb9v77g7xh4cnhy9sxlpilf775nli9bynrk";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||
|
||||
installPhase = ''
|
||||
install --directory --mode=755 $out/bin
|
||||
install --mode=755 cue2pops $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert CUE to ISO suitable to POPStarter";
|
||||
homepage = "https://github.com/makefu/cue2pops-linux";
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/cd-dvd/cuetools/default.nix
Normal file
32
pkgs/tools/cd-dvd/cuetools/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook
|
||||
, bison, flac, flex, id3v2, vorbis-tools
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cuetools";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "svend";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "02ksv1ahf1v4cr2xbclsfv5x17m9ivzbssb5r8xjm97yh8a7spa3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
buildInputs = [ bison flac flex id3v2 vorbis-tools ];
|
||||
|
||||
postInstall = ''
|
||||
# add link for compatibility with Debian-based distros, which package `cuetag.sh` as `cuetag`
|
||||
ln -s $out/bin/cuetag.sh $out/bin/cuetag
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A set of utilities for working with cue files and toc files";
|
||||
homepage = "https://github.com/svend/cuetools";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ codyopel jcumming ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
41
pkgs/tools/cd-dvd/dvd+rw-tools/default.nix
Normal file
41
pkgs/tools/cd-dvd/dvd+rw-tools/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, cdrtools, m4 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dvd+rw-tools";
|
||||
version = "7.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://fy.chalmers.se/~appro/linux/DVD+RW/tools/${pname}-${version}.tar.gz";
|
||||
sha256 = "1jkjvvnjcyxpql97xjjx0kwvy70kxpiznr2zpjy2hhci5s10zmpq";
|
||||
};
|
||||
|
||||
# Patches from Gentoo
|
||||
patches = [ ]
|
||||
++ builtins.map ({pfile, sha256}: fetchpatch {
|
||||
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-cdr/dvd+rw-tools/files/${pfile}?id=b510df361241e8f16314b1f14642305f0111dac6";
|
||||
inherit sha256;
|
||||
})
|
||||
[{ pfile = "dvd+rw-tools-7.0-dvddl-r1.patch"; sha256 = "12l33jq6405shfwdycrj52qmd07h5bsp1vjaddknfri456azjny5"; }
|
||||
{ pfile = "dvd+rw-tools-7.0-glibc2.6.90.patch"; sha256 = "1fb3gap2in782pa4164h1w0ha8ggsq3inissa1k0zn2p2r3rb5ln"; }
|
||||
{ pfile = "dvd+rw-tools-7.0-reload.patch"; sha256 = "12v2y2y6ci5hh6lbmsk97dzgznrm4bxwhc81mq684ix0qspb9mq4"; }
|
||||
{ pfile = "dvd+rw-tools-7.0-sysmacros.patch"; sha256 = "1rkb26cyhfxklkmna3l9b4797f6gzlxyqqin44jwnq3jmwfrs6v0"; }
|
||||
{ pfile = "dvd+rw-tools-7.0-wctomb-r1.patch"; sha256 = "1xg770l0b4bjn30y7nqg619v4m5ickcn2n8hv9k2an6r191daq58"; }
|
||||
{ pfile = "dvd+rw-tools-7.0-wexit.patch"; sha256 = "0sqzlkm19fmjx4lzxkxwn2ymrj9fq0zk0jkys3xm6xvd2ibb6kxl"; }
|
||||
{ pfile = "dvd+rw-tools-7.1-bluray_pow_freespace.patch"; sha256 = "0iscz8fs5002ymk6wl2fz4x06b7bdnc57rfz8kbv3216acqi5rv3"; }
|
||||
{ pfile = "dvd+rw-tools-7.1-bluray_srm+pow.patch"; sha256 = "0sy40m12w987i6g0cyxv8cfmab4vp7cd222lv05apknfi2y7smmw"; }
|
||||
{ pfile = "dvd+rw-tools-7.1-lastshort.patch"; sha256 = "01wspv70sil20khkg5kj086b1x8rrig4yhcq9s88bdjd42nv0vpx"; }
|
||||
{ pfile = "dvd+rw-tools-7.1-noevent.patch"; sha256 = "1kbmxpg15wci33f2h6pxxvf3qm0kpyzx9wj5a3l67sk34hvza3z6"; }
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ m4 ];
|
||||
buildInputs = [ cdrtools ];
|
||||
|
||||
makeFlags = [ "prefix=${placeholder "out"}" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://fy.chalmers.se/~appro/linux/DVD+RW/tools";
|
||||
description = "Tools for mastering Blu-ray and DVD+-RW/+-R media";
|
||||
platforms = platforms.linux;
|
||||
license = with licenses; [ gpl2 publicDomain ];
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/cd-dvd/dvd-vr/default.nix
Normal file
20
pkgs/tools/cd-dvd/dvd-vr/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dvd-vr";
|
||||
version = "0.9.7";
|
||||
src = fetchurl {
|
||||
url = "https://www.pixelbeat.org/programs/dvd-vr/dvd-vr-${version}.tar.gz";
|
||||
sha256 = "13wkdia3c0ryda40b2nzpb9vddimasgc4w95hvl0k555k9k8bl0r";
|
||||
};
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.pixelbeat.org/programs/dvd-vr/";
|
||||
downloadPage = "https://www.pixelbeat.org/programs/dvd-vr/";
|
||||
description = "A utility to identify and optionally copy recordings from a DVD-VR format disc";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
};
|
||||
}
|
||||
|
||||
97
pkgs/tools/cd-dvd/dvdisaster/default.nix
Normal file
97
pkgs/tools/cd-dvd/dvdisaster/default.nix
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, gettext
|
||||
, pkg-config
|
||||
, which
|
||||
, glib
|
||||
, gtk2
|
||||
, enableSoftening ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dvdisaster";
|
||||
version = "0.79.9";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dvdisaster.jcea.es/downloads/${pname}-${version}.tar.bz2";
|
||||
hash = "sha256-eclOJ33pS2aP4F7RUHc84ynpH7sTv2dsO4vn5vB248M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gettext pkg-config which ];
|
||||
buildInputs = [ glib gtk2 ];
|
||||
|
||||
patches = lib.optional enableSoftening [
|
||||
./encryption.patch
|
||||
./dvdrom.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
sed -i 's/dvdisaster48.png/dvdisaster/' contrib/dvdisaster.desktop
|
||||
substituteInPlace scripts/bash-based-configure \
|
||||
--replace 'if (make -v | grep "GNU Make") > /dev/null 2>&1 ;' \
|
||||
'if make -v | grep "GNU Make" > /dev/null 2>&1 ;'
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
# Explicit --docdir= is required for on-line help to work:
|
||||
"--docdir=share/doc"
|
||||
"--with-nls=yes"
|
||||
"--with-embedded-src-path=no"
|
||||
] ++ lib.optional (stdenv.hostPlatform.isx86_64) "--with-sse2=yes";
|
||||
|
||||
# fatal error: inlined-icons.h: No such file or directory
|
||||
enableParallelBuilding = false;
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
pushd regtest
|
||||
|
||||
mkdir -p "$TMP"/{log,regtest}
|
||||
substituteInPlace common.bash \
|
||||
--replace /dev/shm "$TMP/log" \
|
||||
--replace /var/tmp "$TMP"
|
||||
|
||||
for test in *.bash; do
|
||||
case "$test" in
|
||||
common.bash)
|
||||
echo "Skipping $test"
|
||||
continue ;;
|
||||
*)
|
||||
echo "Running $test"
|
||||
./"$test"
|
||||
esac
|
||||
done
|
||||
|
||||
popd
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/bin/dvdisaster-uninstall.sh
|
||||
mkdir -pv $out/share/applications
|
||||
cp contrib/dvdisaster.desktop $out/share/applications/
|
||||
|
||||
for size in 16 24 32 48 64; do
|
||||
mkdir -pv $out/share/icons/hicolor/"$size"x"$size"/apps/
|
||||
cp contrib/dvdisaster"$size".png \
|
||||
$out/share/icons/hicolor/"$size"x"$size"/apps/dvdisaster.png
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://dvdisaster.jcea.es/";
|
||||
description = "Data loss/scratch/aging protection for CD/DVD media";
|
||||
longDescription = ''
|
||||
Dvdisaster provides a margin of safety against data loss on CD and
|
||||
DVD media caused by scratches or aging media. It creates error correction
|
||||
data which is used to recover unreadable sectors if the disc becomes
|
||||
damaged at a later time.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
19
pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch
Normal file
19
pkgs/tools/cd-dvd/dvdisaster/dvdrom.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Author: Corey Wright <undefined@pobox.com>
|
||||
Description: Adds support for DVD-ROM medium-type.
|
||||
|
||||
Index: dvdisaster/scsi-layer.c
|
||||
===================================================================
|
||||
--- dvdisaster.orig/scsi-layer.c 2012-03-06 11:10:17.147044691 +0900
|
||||
+++ dvdisaster/scsi-layer.c 2012-03-06 11:10:30.927044292 +0900
|
||||
@@ -913,6 +913,11 @@
|
||||
break;
|
||||
}
|
||||
|
||||
+ if(layer_type & 0x01)
|
||||
+ { dh->typeDescr = g_strdup("DVD-ROM");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
if(layer_type & 0x06) /* strange thing: (re-)writeable but neither plus nor dash */
|
||||
{ dh->typeDescr = g_strdup("DVD-ROM (fake)");
|
||||
dh->subType = DVD;
|
||||
19
pkgs/tools/cd-dvd/dvdisaster/encryption.patch
Normal file
19
pkgs/tools/cd-dvd/dvdisaster/encryption.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Author: n/a
|
||||
Description: Disables to skip on encrypted disks (e.g. DVD with CSS-Encryption).
|
||||
|
||||
diff -Naur dvdisaster-0.79.5.orig/scsi-layer.c dvdisaster-0.79.5/scsi-layer.c
|
||||
--- dvdisaster-0.79.5.orig/scsi-layer.c 2015-10-28 21:56:57.000000000 +0100
|
||||
+++ dvdisaster-0.79.5/scsi-layer.c 2015-12-27 06:19:32.012253661 +0100
|
||||
@@ -2712,12 +2712,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if(dh->mainType == DVD && query_copyright(dh))
|
||||
- { CloseImage(image);
|
||||
- Stop(_("This software does not support encrypted media.\n"));
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
/* Create the bitmap of simulated defects */
|
||||
|
||||
if(Closure->simulateDefects)
|
||||
29
pkgs/tools/cd-dvd/ecm-tools/default.nix
Normal file
29
pkgs/tools/cd-dvd/ecm-tools/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ecm-tools";
|
||||
version = "1.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alucryd";
|
||||
repo = "ecm-tools";
|
||||
rev = "v${version}";
|
||||
sha256 = "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
installPhase = ''
|
||||
install --directory --mode=755 $out/bin
|
||||
install --mode=755 bin2ecm $out/bin
|
||||
(cd $out/bin; ln -s bin2ecm ecm2bin)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A utility to uncompress ECM files to BIN CD format";
|
||||
homepage = "https://github.com/alucryd/ecm-tools";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/cd-dvd/isolyzer/default.nix
Normal file
25
pkgs/tools/cd-dvd/isolyzer/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "isolyzer";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "KBNLresearch";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1fysm05cz0z54apn1p889xhbgjnfwax6fngi05yij5qp2zxqghf9";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [ setuptools six ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/KBNLresearch/isolyzer";
|
||||
description = "Verify size of ISO 9660 image against Volume Descriptor fields";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ mkg20001 ];
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/cd-dvd/isomd5sum/default.nix
Normal file
40
pkgs/tools/cd-dvd/isomd5sum/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, python3
|
||||
, popt
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "isomd5sum";
|
||||
version = "1.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhinstaller";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1wjnh2hlp1hjjm4a8wzdhdrm73jq41lmpmy3ls0rh715p3j7z4q9";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ python3 ];
|
||||
buildInputs = [ popt ] ;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace "#/usr/" "#"
|
||||
substituteInPlace Makefile --replace "/usr/" "/"
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
makeFlags = [ "DESTDIR=${placeholder "out"}" ];
|
||||
|
||||
# we don't install python stuff as it borks up directories
|
||||
installTargets = [ "install-bin" "install-devel" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/rhinstaller/isomd5sum";
|
||||
description = "Utilities for working with md5sum implanted in ISO images";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ knl ];
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/cd-dvd/lsdvd/default.nix
Normal file
20
pkgs/tools/cd-dvd/lsdvd/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, stdenv, fetchurl, libdvdread, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lsdvd";
|
||||
version = "0.17";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/lsdvd/lsdvd-${version}.tar.gz";
|
||||
sha256 = "1274d54jgca1prx106iyir7200aflr70bnb1kawndlmcckcmnb3x";
|
||||
};
|
||||
|
||||
buildInputs = [ libdvdread ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://sourceforge.net/projects/lsdvd/";
|
||||
description = "Display information about audio, video, and subtitle tracks on a DVD";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/cd-dvd/mdf2iso/default.nix
Normal file
20
pkgs/tools/cd-dvd/mdf2iso/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{lib, stdenv, fetchgit}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mdf2iso";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://salsa.debian.org/debian/mdf2iso";
|
||||
rev = "c6a5b588318d43bc8af986bbe48d0a06e92f4280";
|
||||
sha256 = "0xg43jlvrk8adfjgbjir15nxwcj0nhz4gxpqx7jdfvhg0kwliq0n";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Small utility that converts MDF images to ISO format";
|
||||
homepage = src.url;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.oxij ];
|
||||
};
|
||||
}
|
||||
21
pkgs/tools/cd-dvd/mkcue/default.nix
Normal file
21
pkgs/tools/cd-dvd/mkcue/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mkcue";
|
||||
version = "1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://http.debian.net/debian/pool/main/m/mkcue/mkcue_${version}.orig.tar.gz";
|
||||
sha256 = "0rs897wp08z4hd904bjb5sl4lb8qxj82x5ayklr28bhg9pd5gbra";
|
||||
};
|
||||
|
||||
preInstall = "mkdir -pv $out/bin";
|
||||
postInstall = "chmod -v +w $out/bin/mkcue";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generates CUE sheets from a CD TOC";
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/cd-dvd/nrg2iso/default.nix
Normal file
23
pkgs/tools/cd-dvd/nrg2iso/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{lib, stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nrg2iso";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://gregory.kokanosky.free.fr/v4/linux/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-O+NqQWdY/BkQRztJqNrfKiqj1R8ZdhlzNrwXS8HjBuU=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/bin/
|
||||
cp -v nrg2iso $out/bin/nrg2iso
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A linux utils for converting CD (or DVD) image generated by Nero Burning Rom to ISO format";
|
||||
homepage = "http://gregory.kokanosky.free.fr/v4/linux/nrg2iso.en.html";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
41
pkgs/tools/cd-dvd/sacd/default.nix
Normal file
41
pkgs/tools/cd-dvd/sacd/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sacd";
|
||||
version = "19.7.16.37";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Sound-Linux-More";
|
||||
repo = "sacd";
|
||||
rev = version;
|
||||
sha256 = "03s7jr75pzqj1xd41rkgbszlgf9zx6vzhd0nizc05wyf0fxq5xif";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Makefile prefix, otherwise `/usr` prefix is enforced
|
||||
(fetchpatch {
|
||||
url = "https://github.com/Sound-Linux-More/sacd/pull/1.patch";
|
||||
name = "makefile-prefix.patch";
|
||||
sha256 = "0a7r4x0yqpg6l4vr84dq4wbrypabqm4vvcjv91am068gqjiw6w64";
|
||||
})
|
||||
];
|
||||
|
||||
makeFlagsArray = [
|
||||
"PREFIX=$(out)"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Converts SACD image files, Philips DSDIFF and Sony DSF files to 24-bit high resolution wave files. Handles both DST and DSD streams. ";
|
||||
longDescription = ''
|
||||
Super Audio CD decoder. Converts SACD image files, Philips DSDIFF and Sony DSF files to 24-bit high resolution wave files.
|
||||
Handles both DST and DSD streams.
|
||||
'';
|
||||
homepage = "https://github.com/Sound-Linux-More/sacd";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.doronbehar ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/cd-dvd/srt-to-vtt-cl/default.nix
Normal file
32
pkgs/tools/cd-dvd/srt-to-vtt-cl/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub, substituteAll }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "srt-to-vtt-cl";
|
||||
version = "unstable-2019-01-03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nwoltman";
|
||||
repo = pname;
|
||||
rev = "ce3d0776906eb847c129d99a85077b5082f74724";
|
||||
sha256 = "0qxysj08gjr6npyvg148llmwmjl2n9cyqjllfnf3gxb841dy370n";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix-validation.patch;
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bin/$(uname -s)/$(uname -m)/srt-vtt $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert SRT files to VTT";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ericdallo ];
|
||||
homepage = "https://github.com/nwoltman/srt-to-vtt-cl";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
13
pkgs/tools/cd-dvd/srt-to-vtt-cl/fix-validation.patch
Normal file
13
pkgs/tools/cd-dvd/srt-to-vtt-cl/fix-validation.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,9 +1,4 @@
|
||||
-ERR = $(shell which clang++ >/dev/null; echo $$?)
|
||||
-ifeq "$(ERR)" "0"
|
||||
- CXX ?= clang++
|
||||
-else
|
||||
- CXX ?= g++
|
||||
-endif
|
||||
+CXX ?= g++
|
||||
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)
|
||||
25
pkgs/tools/cd-dvd/uif2iso/default.nix
Normal file
25
pkgs/tools/cd-dvd/uif2iso/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl, unzip, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "uif2iso";
|
||||
version = "0.1.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://aluigi.altervista.org/mytoolz/uif2iso.zip";
|
||||
sha256 = "1v18fmlzhkkhv8xdc9dyvl8vamwg3ka4dsrg7vvmk1f2iczdx3dp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildInputs = [zlib];
|
||||
|
||||
installPhase = ''
|
||||
make -C . prefix="$out" install;
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Tool for converting single/multi part UIF image files to ISO";
|
||||
homepage = "http://aluigi.org/mytoolz.htm#uif2iso";
|
||||
license = lib.licenses.gpl1Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
84
pkgs/tools/cd-dvd/unetbootin/default.nix
Normal file
84
pkgs/tools/cd-dvd/unetbootin/default.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, coreutils
|
||||
, fetchFromGitHub
|
||||
, mtools
|
||||
, p7zip
|
||||
, wrapQtAppsHook
|
||||
, qtbase
|
||||
, qttools
|
||||
, qmake
|
||||
, syslinux
|
||||
, util-linux
|
||||
, which
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "unetbootin";
|
||||
version = "702";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-psX15XicPXAsd36BhuvK0G3GQS8hV/hazzO0HByCqV4=";
|
||||
};
|
||||
|
||||
setSourceRoot = ''
|
||||
sourceRoot=$(echo */src/unetbootin)
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qttools
|
||||
qmake
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
||||
|
||||
# Lots of nice hard-coded paths...
|
||||
postPatch = ''
|
||||
substituteInPlace unetbootin.cpp \
|
||||
--replace /bin/df ${coreutils}/bin/df \
|
||||
--replace /sbin/blkid ${util-linux}/sbin/blkid \
|
||||
--replace /sbin/fdisk ${util-linux}/sbin/fdisk \
|
||||
--replace /sbin/sfdisk ${util-linux}/sbin/sfdisk \
|
||||
--replace /usr/bin/syslinux ${syslinux}/bin/syslinux \
|
||||
--replace /usr/bin/extlinux ${syslinux}/sbin/extlinux \
|
||||
--replace /usr/share/syslinux ${syslinux}/share/syslinux
|
||||
|
||||
substituteInPlace main.cpp \
|
||||
--replace /usr/share/unetbootin $out/share/unetbootin
|
||||
|
||||
substituteInPlace unetbootin.desktop \
|
||||
--replace /usr/bin $out/bin
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
lupdate unetbootin.pro
|
||||
lrelease unetbootin.pro
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 -t $out/bin unetbootin
|
||||
install -Dm644 -t $out/share/unetbootin unetbootin_*.qm
|
||||
install -Dm644 -t $out/share/applications unetbootin.desktop
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--prefix PATH : ${lib.makeBinPath [ mtools p7zip which ]}"
|
||||
"--set QT_X11_NO_MITSHM 1"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to create bootable live USB drives from ISO images";
|
||||
homepage = "https://unetbootin.github.io/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ebzzry ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
5
pkgs/tools/cd-dvd/ventoy-bin/add-mips64.patch
Normal file
5
pkgs/tools/cd-dvd/ventoy-bin/add-mips64.patch
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
--- VentoyPlugson.sh
|
||||
+++ VentoyPlugson.sh
|
||||
@@ -27,0 +28,2 @@ elif echo $machine | egrep -q 'x86_64|am
|
||||
+elif echo $machine | egrep -q 'mips64'; then
|
||||
+ TOOLDIR=mips64el
|
||||
142
pkgs/tools/cd-dvd/ventoy-bin/default.nix
Normal file
142
pkgs/tools/cd-dvd/ventoy-bin/default.nix
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch
|
||||
, autoPatchelfHook, makeWrapper
|
||||
, bash, coreutils, dosfstools, exfat, gawk, gnugrep, gnused, hexdump, parted
|
||||
, procps, util-linux, which, xz
|
||||
, withCryptsetup ? false, cryptsetup
|
||||
, withXfs ? false, xfsprogs
|
||||
, withExt4 ? false, e2fsprogs
|
||||
, withNtfs ? false, ntfs3g
|
||||
, withGtk3 ? false, gtk3
|
||||
, withQt5 ? false, qt5
|
||||
, defaultGuiType ? ""
|
||||
}:
|
||||
|
||||
assert lib.elem defaultGuiType ["" "gtk3" "qt5"];
|
||||
assert defaultGuiType == "gtk3" -> withGtk3;
|
||||
assert defaultGuiType == "qt5" -> withQt5;
|
||||
|
||||
let
|
||||
arch = {
|
||||
x86_64-linux = "x86_64";
|
||||
i686-linux = "i386";
|
||||
aarch64-linux = "aarch64";
|
||||
mipsel-linux = "mips64el";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported platform ${stdenv.hostPlatform.system}");
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "ventoy-bin";
|
||||
version = "1.0.75";
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper ]
|
||||
++ lib.optional withQt5 qt5.wrapQtAppsHook;
|
||||
buildInputs = [
|
||||
bash coreutils dosfstools exfat gawk gnugrep gnused hexdump parted procps
|
||||
util-linux which xz
|
||||
] ++ lib.optional withCryptsetup cryptsetup
|
||||
++ lib.optional withXfs xfsprogs
|
||||
++ lib.optional withExt4 e2fsprogs
|
||||
++ lib.optional withNtfs ntfs3g
|
||||
++ lib.optional withGtk3 gtk3
|
||||
++ lib.optional withQt5 qt5.qtbase;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ventoy/Ventoy/releases/download/v${version}/ventoy-${version}-linux.tar.gz";
|
||||
sha256 = "64487c11da3be1aa95ae5631c12fcfefbabf3d27c80d8992145e572c5e44a535";
|
||||
};
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "sanitize.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/sanitize.patch?h=057f2d1eb496c7a3aaa8229e99a7f709428fa4c5";
|
||||
sha256 = "sha256-iAtLtM+Q4OsXDK83eCnPNomeNSEqdRLFfK2x7ybPSpk=";
|
||||
})
|
||||
./fix-for-read-only-file-system.patch
|
||||
./add-mips64.patch
|
||||
];
|
||||
patchFlags = [ "-p0" ];
|
||||
postPatch = ''
|
||||
# Fix permissions.
|
||||
find -type f -name \*.sh -exec chmod a+x '{}' \;
|
||||
|
||||
# Fix path to log.
|
||||
sed -i 's:log\.txt:/var/log/ventoy\.log:g' \
|
||||
WebUI/static/js/languages.js tool/languages.json
|
||||
'';
|
||||
installPhase = ''
|
||||
# Setup variables.
|
||||
local VENTOY_PATH="$out"/share/ventoy
|
||||
local ARCH='${arch}'
|
||||
|
||||
# Prepare.
|
||||
cd tool/"$ARCH"
|
||||
rm ash* hexdump* mkexfatfs* mount.exfat-fuse* xzcat*
|
||||
for archive in *.xz; do
|
||||
xzcat "$archive" > "''${archive%.xz}"
|
||||
rm "$archive"
|
||||
done
|
||||
chmod a+x *
|
||||
cd -
|
||||
|
||||
# Cleanup.
|
||||
case "$ARCH" in
|
||||
x86_64) rm -r {tool/,VentoyGUI.}{i386,aarch64,mips64el};;
|
||||
i386) rm -r {tool/,VentoyGUI.}{x86_64,aarch64,mips64el};;
|
||||
aarch64) rm -r {tool/,VentoyGUI.}{x86_64,i386,mips64el};;
|
||||
mips64el) rm -r {tool/,VentoyGUI.}{x86_64,i386,aarch64};;
|
||||
esac
|
||||
rm README
|
||||
rm tool/"$ARCH"/Ventoy2Disk.gtk2 || true # For aarch64 and mips64el.
|
||||
|
||||
# Copy from "$src" to "$out".
|
||||
mkdir -p "$out"/bin "$VENTOY_PATH"
|
||||
cp -r . "$VENTOY_PATH"
|
||||
|
||||
# Fill bin dir.
|
||||
for f in Ventoy2Disk.sh_ventoy VentoyWeb.sh_ventoy-web \
|
||||
CreatePersistentImg.sh_ventoy-persistent \
|
||||
ExtendPersistentImg.sh_ventoy-extend-persistent \
|
||||
VentoyPlugson.sh_ventoy-plugson; do
|
||||
local bin="''${f%_*}" wrapper="''${f#*_}"
|
||||
makeWrapper "$VENTOY_PATH/$bin" "$out/bin/$wrapper" \
|
||||
--prefix PATH : "${lib.makeBinPath buildInputs}" \
|
||||
--chdir "$VENTOY_PATH"
|
||||
done
|
||||
'' + lib.optionalString (withGtk3 || withQt5) ''
|
||||
# VentoGUI uses the `ventoy_gui_type` file to determine the type of GUI.
|
||||
# See <https://github.com/ventoy/Ventoy/blob/471432fc50ffad80bde5de0b22e4c30fa3aac41b/LinuxGUI/Ventoy2Disk/ventoy_gui.c#L1044>.
|
||||
echo "${defaultGuiType}" > "$VENTOY_PATH/ventoy_gui_type"
|
||||
makeWrapper "$VENTOY_PATH/VentoyGUI.$ARCH" "$out/bin/ventoy-gui" \
|
||||
--prefix PATH : "${lib.makeBinPath buildInputs}" \
|
||||
--chdir "$VENTOY_PATH"
|
||||
mkdir "$out"/share/{applications,pixmaps}
|
||||
ln -s "$VENTOY_PATH"/WebUI/static/img/VentoyLogo.png "$out"/share/pixmaps/
|
||||
cp ${./ventoy-gui.desktop} "$out"/share/applications/
|
||||
'' + lib.optionalString (!withGtk3) ''
|
||||
rm "$VENTOY_PATH"/tool/{"$ARCH"/Ventoy2Disk.gtk3,VentoyGTK.glade}
|
||||
'' + lib.optionalString (!withQt5) ''
|
||||
rm "$VENTOY_PATH/tool/$ARCH/Ventoy2Disk.qt5"
|
||||
'' + lib.optionalString (!withGtk3 && !withQt5) ''
|
||||
rm "$VENTOY_PATH"/VentoyGUI.*
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files";
|
||||
longDescription = ''
|
||||
An open source tool to create bootable USB drive for
|
||||
ISO/WIM/IMG/VHD(x)/EFI files. With ventoy, you don't need to format the
|
||||
disk over and over, you just need to copy the ISO/WIM/IMG/VHD(x)/EFI
|
||||
files to the USB drive and boot them directly. You can copy many files
|
||||
at a time and ventoy will give you a boot menu to select them. You can
|
||||
also browse ISO/WIM/IMG/VHD(x)/EFI files in local disk and boot them.
|
||||
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are
|
||||
supported in the same way. Most type of OS supported
|
||||
(Windows/WinPE/Linux/ChromeOS/Unix/VMware/Xen...). With ventoy you can
|
||||
also browse ISO/WIM/IMG/VHD(x)/EFI files in local disk and boot them.
|
||||
800+ image files are tested. 90%+ distros in <distrowatch.com>
|
||||
supported.
|
||||
'';
|
||||
homepage = "https://www.ventoy.net";
|
||||
changelog = "https://www.ventoy.net/doc_news.html";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "mipsel-linux" ];
|
||||
maintainers = with maintainers; [ k4leg ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
--- CreatePersistentImg.sh
|
||||
+++ CreatePersistentImg.sh
|
||||
@@ -110,7 +110,3 @@ if [ -n "$config" ]; then
|
||||
- if [ -d ./persist_tmp_mnt ]; then
|
||||
- rm -rf ./persist_tmp_mnt
|
||||
- fi
|
||||
-
|
||||
- mkdir ./persist_tmp_mnt
|
||||
- if mount $freeloop ./persist_tmp_mnt; then
|
||||
- echo '/ union' > ./persist_tmp_mnt/$config
|
||||
+ path_to_persist_mnt="`mktemp -d`"
|
||||
+ if mount $freeloop "$path_to_persist_mnt"; then
|
||||
+ echo '/ union' > "$path_to_persist_mnt"/$config
|
||||
@@ -118 +114 @@ if [ -n "$config" ]; then
|
||||
- umount ./persist_tmp_mnt
|
||||
+ umount "$path_to_persist_mnt"
|
||||
@@ -120 +116 @@ if [ -n "$config" ]; then
|
||||
- rm -rf ./persist_tmp_mnt
|
||||
+ rm -rf "$path_to_persist_mnt"
|
||||
--- tool/VentoyWorker.sh
|
||||
+++ tool/VentoyWorker.sh
|
||||
@@ -162,12 +161,0 @@ fi
|
||||
-#check tmp_mnt directory
|
||||
-if [ -d ./tmp_mnt ]; then
|
||||
- vtdebug "There is a tmp_mnt directory, now delete it."
|
||||
- umount ./tmp_mnt >/dev/null 2>&1
|
||||
- rm -rf ./tmp_mnt
|
||||
- if [ -d ./tmp_mnt ]; then
|
||||
- vterr "tmp_mnt directory exists, please delete it first."
|
||||
- exit 1
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-
|
||||
@@ -569,2 +557,2 @@ else
|
||||
- rm -f ./diskuuid.bin
|
||||
- dd status=none conv=fsync if=${DISK} skip=384 bs=1 count=16 of=./diskuuid.bin
|
||||
+ path_to_diskuuid="`mktemp`"
|
||||
+ dd status=none conv=fsync if=${DISK} skip=384 bs=1 count=16 of="$path_to_diskuuid"
|
||||
@@ -573,2 +561,2 @@ else
|
||||
- dd status=none conv=fsync if=./diskuuid.bin of=$DISK bs=1 count=16 seek=384
|
||||
- rm -f ./diskuuid.bin
|
||||
+ dd status=none conv=fsync if="$path_to_diskuuid" of=$DISK bs=1 count=16 seek=384
|
||||
+ rm -f "$path_to_diskuuid"
|
||||
@@ -577,2 +565,2 @@ else
|
||||
- rm -f ./rsvdata.bin
|
||||
- dd status=none conv=fsync if=${DISK} skip=2040 bs=512 count=8 of=./rsvdata.bin
|
||||
+ path_to_rsvdata="`mktemp`"
|
||||
+ dd status=none conv=fsync if=${DISK} skip=2040 bs=512 count=8 of="$path_to_rsvdata"
|
||||
@@ -600,2 +588,2 @@ else
|
||||
- dd status=none conv=fsync if=./rsvdata.bin seek=2040 bs=512 count=8 of=${DISK}
|
||||
- rm -f ./rsvdata.bin
|
||||
+ dd status=none conv=fsync if="$path_to_rsvdata" seek=2040 bs=512 count=8 of=${DISK}
|
||||
+ rm -f "$path_to_rsvdata"
|
||||
10
pkgs/tools/cd-dvd/ventoy-bin/ventoy-gui.desktop
Normal file
10
pkgs/tools/cd-dvd/ventoy-bin/ventoy-gui.desktop
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Comment=Tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files
|
||||
Exec=ventoy-gui
|
||||
Hidden=false
|
||||
Icon=VentoyLogo
|
||||
Name=Ventoy
|
||||
StartupNotify=true
|
||||
Terminal=false
|
||||
Type=Application
|
||||
23
pkgs/tools/cd-dvd/vobcopy/default.nix
Normal file
23
pkgs/tools/cd-dvd/vobcopy/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl, libdvdread, libdvdcss }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vobcopy";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.vobcopy.org/download/vobcopy-${version}.tar.bz2";
|
||||
sha256 = "01l1yihbd73srzghzzx5dgfg3yfb5kml5dix52mq0snhjp8h89c9";
|
||||
};
|
||||
|
||||
buildInputs = [libdvdread libdvdcss];
|
||||
makeFlags = [ "DESTDIR=$(out)" "PREFIX=/" ];
|
||||
|
||||
meta = {
|
||||
description = "Copies DVD .vob files to harddisk, decrypting them on the way";
|
||||
homepage = "http://vobcopy.org/projects/c/c.shtml";
|
||||
license = lib.licenses.gpl2;
|
||||
|
||||
maintainers = [ lib.maintainers.bluescreen303 ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/cd-dvd/vobsub2srt/default.nix
Normal file
25
pkgs/tools/cd-dvd/vobsub2srt/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, libtiff, pkg-config, tesseract }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vobsub2srt";
|
||||
version = "unstable-2014-08-17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ruediger";
|
||||
repo = "VobSub2SRT";
|
||||
rev = "a6abbd61127a6392d420bbbebdf7612608c943c2";
|
||||
sha256 = "sha256-i6V2Owb8GcTcWowgb/BmdupOSFsYiCF2SbC9hXa26uY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libtiff ];
|
||||
propagatedBuildInputs = [ tesseract ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/ruediger/VobSub2SRT";
|
||||
description = "Converts VobSub subtitles into SRT subtitles";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.ttuegel ];
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/cd-dvd/xorriso/default.nix
Normal file
37
pkgs/tools/cd-dvd/xorriso/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ fetchurl, lib, stdenv, libcdio, zlib, bzip2, readline, acl, attr, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xorriso";
|
||||
version = "1.5.4.pl02";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/xorriso/xorriso-${version}.tar.gz";
|
||||
sha256 = "sha256-Psc5PUqdy/X3QwnCikFfVSJ+xidwuVrpk6yNejsVKXI=";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
buildInputs = [ libcdio zlib bzip2 readline libiconv ]
|
||||
++ lib.optionals stdenv.isLinux [ acl attr ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "ISO 9660 Rock Ridge file system manipulator";
|
||||
|
||||
longDescription =
|
||||
'' GNU xorriso copies file objects from POSIX compliant filesystems
|
||||
into Rock Ridge enhanced ISO 9660 filesystems and allows
|
||||
session-wise manipulation of such filesystems. It can load the
|
||||
management information of existing ISO images and it writes the
|
||||
session results to optical media or to filesystem objects. Vice
|
||||
versa xorriso is able to copy file objects out of ISO 9660
|
||||
filesystems.
|
||||
'';
|
||||
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
homepage = "https://www.gnu.org/software/xorriso/";
|
||||
|
||||
maintainers = [ maintainers.vrthra ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue