guix: swap rcodesign for ldid

This commit is contained in:
tobtoht 2023-03-24 04:12:12 +01:00
parent 913efe350f
commit 484155c350
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
4 changed files with 37 additions and 13 deletions

View file

@ -1,10 +0,0 @@
package=native_rcodesign
$(package)_version=0.22.0
$(package)_download_path=https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign/$($(package)_version)/
$(package)_file_name=apple-codesign-$($(package)_version)-x86_64-unknown-linux-musl.tar.gz
$(package)_sha256_hash=f6382c5e6e47bc4f6f02be2ad65a4fc5120b3df75aa520647abbadbae747fbcc
define $(package)_stage_cmds
mkdir -p $($(package)_staging_prefix_dir)/bin && \
cp rcodesign $($(package)_staging_prefix_dir)/bin
endef

View file

@ -5,7 +5,7 @@ linux_packages := eudev liblzma libarchive libfuse libsquashfuse libappimage app
linux_native_packages = native_patchelf linux_native_packages = native_patchelf
darwin_packages := darwin_packages :=
darwin_native_packages = darwin_sdk native_cctools native_libtapi native_clang native_rcodesign darwin_native_packages = darwin_sdk native_cctools native_libtapi native_clang
mingw32_packages = icu4c mingw32_packages = icu4c
mingw32_native_packages = native_cmake mingw32_native_packages = native_cmake

View file

@ -373,9 +373,10 @@ mkdir -p "$DISTSRC"
;; ;;
esac esac
# Ad-hoc code signing
case "$HOST" in case "$HOST" in
arm64-apple-darwin) arm64-apple-darwin)
/feather/contrib/depends/arm64-apple-darwin/native/bin/rcodesign sign Feather.app ldid -S -Cadhoc,linker-signed Feather.app
;; ;;
esac esac

View file

@ -20,6 +20,7 @@
(gnu packages gnome) (gnu packages gnome)
(gnu packages gperf) (gnu packages gperf)
(gnu packages installers) (gnu packages installers)
(gnu packages libusb)
(gnu packages linux) (gnu packages linux)
(gnu packages llvm) (gnu packages llvm)
(gnu packages mingw) (gnu packages mingw)
@ -622,6 +623,38 @@ inspecting signatures in Mach-O binaries.")
Can be used for Qt and other applications ") Can be used for Qt and other applications ")
(license license:gpl3+))) (license license:gpl3+)))
(define-public ldid
(package
(name "ldid")
(version "v2.1.5-procursus7")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ProcursusTeam/"
name "/archive/refs/tags/" version ".tar.gz"))
(sha256
(base32
"0ppzy4d9sl4m0sn8nk8wpi39qfimvka6h2ycr67y8r97y3363r04"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
(replace 'build (lambda _ (invoke "make")))
(delete 'check)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "ldid" bin)
#t)))
)))
(native-inputs (list pkg-config))
(inputs (list openssl libplist))
(home-page "https://github.com/ProcursusTeam/ldid")
(synopsis "Link Identity Editor.")
(description "Put real or fake signatures in a Mach-O.")
(license license:gpl3+)))
(packages->manifest (packages->manifest
(append (append
(list ;; The Basics (list ;; The Basics
@ -679,5 +712,5 @@ inspecting signatures in Mach-O binaries.")
((string-contains target "-linux-") ((string-contains target "-linux-")
(list (make-bitcoin-cross-toolchain target) cmake)) (list (make-bitcoin-cross-toolchain target) cmake))
((string-contains target "darwin") ((string-contains target "darwin")
(list clang-toolchain-10 binutils cmake python-signapple)) (list clang-toolchain-10 binutils cmake python-signapple ldid))
(else '()))))) (else '())))))