1 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
3 ;;; This file is not part of GNU Guix but is distributed under the same
4 ;;; license as GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (custom packages wip
)
20 #:use-module
(guix utils
)
21 #:use-module
(guix packages
)
22 #:use-module
(guix download
)
23 #:use-module
(guix git-download
)
24 #:use-module
((guix licenses
) #:prefix license
:)
25 #:use-module
(guix build-system gnu
)
26 #:use-module
(gnu packages
)
27 #:use-module
(gnu packages libusb
)
28 #:use-module
(gnu packages vim
)
29 #:use-module
(gnu packages wxwidgets
))
37 (uri (string-append "https://github.com/m-ou-se/tek/archive/v"
39 (file-name (string-append name
"-" version
".tar.gz"))
42 "1rpzfs7zsdj9in1rcy5lncjpsmz05wk58ix62zvy2gzqkds463kk"))))
43 (build-system gnu-build-system
)
45 `(#:make-flags
'("LIN_CXX=gcc")
48 (modify-phases %standard-phases
49 (add-after 'unpack
'fix-order
51 (substitute* "Makefile"
52 (("\\$\\(LIN_CXX\\) -c \\$\\(CXXFLAGS\\) `\\$\\(LIN_WXCONFIG\\) --cxxflags` \\$\\(filter %.cpp,\\$\\^\\) -o \\$@")
53 "$(LIN_CXX) -o $@ -c $(CXXFLAGS) `$(LIN_WXCONFIG) --cxxflags` $(filter %.cpp,$^)")
54 (("\\$\\(LIN_CXX\\) \\$\\(CXXFLAGS\\) \\$\\^ `\\$\\(LIN_WXCONFIG\\) --libs` -lusb-1.0 -o \\$@")
55 "$(LIN_CXX) $(CXXFLAGS) $^ -o $@ `$(LIN_WXCONFIG) --libs` -lusb-1.0"))
57 (delete 'configure
))))
59 `(("wxwidgets" ,wxwidgets
)
63 (home-page "https://github.com/m-ou-se/tek")
64 (synopsis "Firmware upgrade tool for the Truly Ergonomic keyboard")
67 (license license
:gpl3
+)))