tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
capture: init at 1.0
Aria Edmonds
7 years ago
2fa2d55b
6662708c
+65
4 changed files
expand all
collapse all
unified
split
pkgs
tools
misc
capture
0001-eval-fix.patch
0002-sane-defaults.patch
default.nix
top-level
all-packages.nix
+10
pkgs/tools/misc/capture/0001-eval-fix.patch
···
1
1
+
diff --git a/src/capture.sh b/src/capture.sh
2
2
+
index a32b018..82d1f15 100755
3
3
+
--- a/src/capture.sh
4
4
+
+++ b/src/capture.sh
5
5
+
@@ -103,4 +103,4 @@ capture () {
6
6
+
7
7
+
8
8
+
# remove this line if you want to source this file instead
9
9
+
-eval " ${0##*/}" "$@"
10
10
+
+capture "$@"
+22
pkgs/tools/misc/capture/0002-sane-defaults.patch
···
1
1
+
diff --git a/src/capture.sh b/src/capture.sh
2
2
+
index a32b018..42f3936 100755
3
3
+
--- a/src/capture.sh
4
4
+
+++ b/src/capture.sh
5
5
+
@@ -9,7 +9,7 @@ set -e
6
6
+
#
7
7
+
8
8
+
scale="-1:-1"
9
9
+
-fps="15"
10
10
+
+fps="30"
11
11
+
raw_video="-vf fps=$fps -c:v utvideo -f nut"
12
12
+
raw_video_container=".nut"
13
13
+
14
14
+
@@ -18,7 +18,7 @@ raw_video_container=".nut"
15
15
+
# https://stackoverflow.com/questions/41372045/vp9-encoding-limited-to-4-threads
16
16
+
webm_video="-pix_fmt yuv420p -c:v libvpx-vp9 -crf 25 -b:v 0 -f webm -tile-columns 6 -frame-parallel 1 -threads 8"
17
17
+
18
18
+
-tmpdir="/var/tmp"
19
19
+
+tmpdir="/tmp"
20
20
+
21
21
+
22
22
+
# capture_raw ./foo.nut
+31
pkgs/tools/misc/capture/default.nix
···
1
1
+
{ stdenv, pkgs, slop, ffmpeg, fetchFromGitHub, makeWrapper}:
2
2
+
3
3
+
stdenv.mkDerivation rec {
4
4
+
name = "capture-${version}";
5
5
+
version = "1.0";
6
6
+
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "buhman";
9
9
+
repo = "capture";
10
10
+
rev = "4be986f17462b8d520559429c74da6bf3a436259";
11
11
+
sha256 = "172y06vs993x5v78zwl81xma1gkvjq1ad9rvmf3a217fyxsz4nhh";
12
12
+
};
13
13
+
14
14
+
buildInputs = [ makeWrapper ];
15
15
+
16
16
+
patches = [ ./0001-eval-fix.patch ./0002-sane-defaults.patch ];
17
17
+
18
18
+
installPhase = ''
19
19
+
install -Dm755 src/capture.sh $out/bin/capture
20
20
+
21
21
+
patchShebangs $out/bin/capture
22
22
+
wrapProgram $out/bin/capture \
23
23
+
--prefix PATH : '${stdenv.lib.makeBinPath [ slop ffmpeg ]}'
24
24
+
'';
25
25
+
26
26
+
meta = with stdenv.lib; {
27
27
+
description = "A no bullshit screen capture tool";
28
28
+
homepage = "https://github.com/buhman/capture";
29
29
+
maintainers = [ maintainers.ar1a ];
30
30
+
};
31
31
+
}
+2
pkgs/top-level/all-packages.nix
···
18713
18713
18714
18714
pb_cli = callPackage ../tools/misc/pb_cli {};
18715
18715
18716
18716
+
capture = callPackage ../tools/misc/capture {};
18717
18717
+
18716
18718
pbrt = callPackage ../applications/graphics/pbrt { };
18717
18719
18718
18720
pcsxr = callPackage ../misc/emulators/pcsxr {