New package: AtomicParsley

+69
+38
pkgs/tools/video/atomicparsley/casts.patch
···
··· 1 + --- AtomicParsley-source-0.9.0/AtomicParsley.cpp.orig 2015-03-13 15:38:16.817904490 -0600 2 + +++ AtomicParsley-source-0.9.0/AtomicParsley.cpp 2015-03-13 15:48:07.595273416 -0600 3 + @@ -1447,7 +1447,7 @@ 4 + uint32_t atom_offsets = 0; 5 + char* uuid_outfile = (char*)calloc(1, sizeof(char)*MAXPATHLEN+1); //malloc a new string because it may be a cli arg for a specific output path 6 + if (output_path == NULL) { 7 + - char* orig_suffix = strrchr(originating_file, '.'); 8 + + char* orig_suffix = strrchr((char*)originating_file, (int)'.'); 9 + if (orig_suffix == NULL) { 10 + fprintf(stdout, "AP warning: a file extension for the input file was not found.\n\tGlobbing onto original filename...\n"); 11 + path_len = strlen(originating_file); 12 + @@ -4464,7 +4464,7 @@ 13 + void APar_DeriveNewPath(const char *filePath, char* temp_path, int output_type, const char* file_kind, char* forced_suffix, bool random_filename = true) { 14 + char* suffix = NULL; 15 + if (forced_suffix == NULL) { 16 + - suffix = strrchr(filePath, '.'); 17 + + suffix = strrchr((char*)filePath, (int)'.'); 18 + } else { 19 + suffix = forced_suffix; 20 + } 21 + @@ -4480,7 +4480,7 @@ 22 + memcpy(temp_path, filePath, base_len); 23 + memcpy(temp_path + base_len, file_kind, strlen(file_kind)); 24 + #else 25 + - char* file_name = strrchr(filePath, '/'); 26 + + char* file_name = strrchr((char*)filePath, (int)'/'); 27 + size_t file_name_len = strlen(file_name); 28 + memcpy(temp_path, filePath, filepath_len-file_name_len+1); 29 + memcpy(temp_path + strlen(temp_path), ".", 1); 30 + @@ -5006,7 +5006,7 @@ 31 + free_modified_name = true; 32 + if (forced_suffix_type == FORCE_M4B_TYPE) { //using --stik Audiobook with --overWrite will change the original file's extension 33 + uint16_t filename_len = strlen(m4aFile); 34 + - char* suffix = strrchr(m4aFile, '.'); 35 + + char* suffix = strrchr((char*)m4aFile, (int)'.'); 36 + memcpy(originating_file, m4aFile, filename_len+1 ); 37 + memcpy(originating_file + (filename_len - strlen(suffix) ), ".m4b", 5 ); 38 + }
+29
pkgs/tools/video/atomicparsley/default.nix
···
··· 1 + { stdenv, pkgs, fetchurl }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "AtomicParsley"; 5 + version = "0.9.0"; 6 + 7 + src = fetchurl { 8 + url = "mirror://sourceforge/atomicparsley/${name}-source-${version}.zip"; 9 + sha256 = "de83f219f95e6fe59099b277e3ced86f0430ad9468e845783092821dff15a72e"; 10 + }; 11 + 12 + buildInputs = with pkgs; [ unzip ]; 13 + patches = [ ./casts.patch ]; 14 + setSourceRoot = "sourceRoot=${name}-source-${version}"; 15 + buildPhase = "bash build"; 16 + installPhase = "install -D AtomicParsley $out/bin/AtomicParsley"; 17 + 18 + meta = with stdenv.lib; { 19 + description = '' 20 + A lightweight command line program for reading, parsing and 21 + setting metadata into MPEG-4 files 22 + ''; 23 + 24 + homepage = http://atomicparsley.sourceforge.net/; 25 + license = licenses.gpl2; 26 + platforms = platforms.unix; 27 + maintainers = with maintainers; [ pjones ]; 28 + }; 29 + }
+2
pkgs/top-level/all-packages.nix
··· 536 }; 537 }; 538 539 attic = callPackage ../tools/backup/attic { }; 540 541 avfs = callPackage ../tools/filesystems/avfs { };
··· 536 }; 537 }; 538 539 + atomicparsley = callPackage ../tools/video/atomicparsley { }; 540 + 541 attic = callPackage ../tools/backup/attic { }; 542 543 avfs = callPackage ../tools/filesystems/avfs { };