tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
srec2bin: init at 1.51
KSJ2000
1 year ago
62bcaff5
3bb0efd4
+59
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
sr
srec2bin
package.nix
package.patch
+28
pkgs/by-name/sr/srec2bin/package.nix
···
1
1
+
{
2
2
+
fetchFromGitHub,
3
3
+
lib,
4
4
+
stdenv,
5
5
+
}:
6
6
+
7
7
+
stdenv.mkDerivation (finalAttrs: {
8
8
+
pname = "srec2bin";
9
9
+
version = "1.51";
10
10
+
11
11
+
src = fetchFromGitHub {
12
12
+
owner = "srec2bin";
13
13
+
repo = "srec";
14
14
+
tag = "V${finalAttrs.version}";
15
15
+
hash = "sha256-akExYUp59Y0XA/MWif+/agz7DcsY/8Y6UI7jt/qMdwk=";
16
16
+
};
17
17
+
18
18
+
patches = [ ./package.patch ]; # upstream builds for windows
19
19
+
20
20
+
meta = {
21
21
+
description = "Tool for converting Motorola S-Record file into a binary image";
22
22
+
homepage = "https://github.com/srec2bin/srec";
23
23
+
license = lib.licenses.gpl3Only;
24
24
+
platforms = lib.platforms.unix;
25
25
+
maintainers = with lib.maintainers; [ KSJ2000 ];
26
26
+
mainProgram = "srec2bin";
27
27
+
};
28
28
+
})
+31
pkgs/by-name/sr/srec2bin/package.patch
···
1
1
+
diff --git a/Makefile b/Makefile
2
2
+
index 56bbd49..23164ce 100644
3
3
+
--- a/Makefile
4
4
+
+++ b/Makefile
5
5
+
@@ -4,12 +4,12 @@ CFLAGS = -c -Wall -O2 -MMD
6
6
+
LDFLAGS = -fno-exceptions -s
7
7
+
8
8
+
MAKEFLAGS += -s
9
9
+
-
10
10
+
-ifeq ($(OS), Windows_NT)
11
11
+
- CC = mingw32-gcc
12
12
+
- EXE_SUFFIX = .exe
13
13
+
-else
14
14
+
+UNAME := $(shell uname -s)
15
15
+
+EXE_SUFFIX = ""
16
16
+
+ifeq ($(UNAME), Linux)
17
17
+
CC = gcc
18
18
+
+else ifeq ($(UNAME), Darwin)
19
19
+
+ CC = clang
20
20
+
endif
21
21
+
22
22
+
LD = $(CC)
23
23
+
@@ -59,4 +59,6 @@ clean:
24
24
+
-$(RM) $(RULES)
25
25
+
-$(RM) $(BIN2SREC_EXE) $(SREC2BIN_EXE) $(BINSPLIT_EXE)
26
26
+
27
27
+
--include $(RULES)
28
28
+
\ No newline at end of file
29
29
+
+-include $(RULES)
30
30
+
+install:
31
31
+
+ install -Dm755 $(BIN2SREC_EXE) $(SREC2BIN_EXE) $(BINSPLIT_EXE) -t $(out)/bin