diff options
| author | Evgenii Lepikhin <e.lepikhin@corp.mail.ru> | 2021-05-28 12:27:42 +0300 |
|---|---|---|
| committer | Evgenii Lepikhin <e.lepikhin@corp.mail.ru> | 2021-05-28 12:27:42 +0300 |
| commit | f4565f97c09bc6e321fa166771841aa5396e5702 (patch) | |
| tree | 3099498b7a274071712d2f2d60628f45f6103bd2 | |
| download | johnlepikhin-guix-channel-f4565f97c09bc6e321fa166771841aa5396e5702.tar.gz | |
Initial commit
| -rw-r--r-- | .guix-channel | 2 | ||||
| -rw-r--r-- | mychannel/packages/myteam.scm | 102 | ||||
| -rw-r--r-- | mychannel/packages/oping.scm | 31 | ||||
| -rw-r--r-- | mychannel/packages/rust-nightly.scm | 101 |
4 files changed, 236 insertions, 0 deletions
diff --git a/.guix-channel b/.guix-channel new file mode 100644 index 0000000..a86f394 --- /dev/null +++ b/.guix-channel @@ -0,0 +1,2 @@ +(channel + (version 0)) diff --git a/mychannel/packages/myteam.scm b/mychannel/packages/myteam.scm new file mode 100644 index 0000000..ac879d9 --- /dev/null +++ b/mychannel/packages/myteam.scm @@ -0,0 +1,102 @@ +(define-module (mychannel packages myteam) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (gnu packages gcc) + #:use-module (gnu packages base) + #:use-module (gnu packages elf) + #:use-module (gnu packages bootstrap) + #:use-module (gnu packages compression) + #:use-module (gnu packages xorg) + #:use-module (gnu packages gnupg) + #:use-module (gnu packages fontutils) + #:use-module (ice-9 match) + #:use-module (guix monads) + #:use-module (guix store) + #:use-module (guix gexp) + #:use-module (guix build-system copy) + #:export (make-myteam)) + +;; Patched version, added support of xz +(define* (url-fetch/tarbomb url hash-algo hash + #:optional name + #:key (system (%current-system)) + (guile (default-guile))) + "Similar to 'url-fetch' but unpack the file from URL in a directory of its +own. This helper makes it easier to deal with \"tar bombs\"." + (define file-name + (match url + ((head k v) + (basename head)) + (z + (basename url)))) + (define gzip + (module-ref (resolve-interface '(gnu packages compression)) 'gzip)) + (define tar + (module-ref (resolve-interface '(gnu packages base)) 'tar)) + (define xz + (module-ref (resolve-interface '(gnu packages compression)) 'xz)) + + (mlet %store-monad ((drv (url-fetch url hash-algo hash + (string-append "tarbomb-" + (or name file-name)) + #:system system + #:guile guile)) + (guile (package->derivation guile system))) + ;; Take the tar bomb, and simply unpack it as a directory. + ;; Use ungrafted tar/gzip so that the resulting tarball doesn't depend on + ;; whether grafts are enabled. + (gexp->derivation (or name file-name) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir #$output) + (setenv "PATH" (string-append #+gzip "/bin:" #+xz "/bin")) + (chdir #$output) + (invoke (string-append #+tar "/bin/tar") + "xf" #$drv))) + #:system system + #:guile-for-build guile + #:graft? #f + #:local-build? #t))) + + +(define (make-myteam version checksum) + (package + (name "myteam") + (version version) + (source (origin + (method url-fetch/tarbomb) + (uri "https://dl.internal.myteam.mail.ru/downloads/linux/x64/latest/myteam.tar.xz") + (sha256 (base32 checksum)))) + (build-system copy-build-system) + (arguments + `(#:install-plan + `(("myteam" "bin/myteam")) + #:phases + (modify-phases + %standard-phases + (add-after + 'strip 'fix-binary + (lambda* + (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (patchelf (string-append (assoc-ref inputs "patchelf") "/bin/patchelf")) + (binary (string-append out "/bin/myteam")) + (dynamic-linker (string-append (assoc-ref inputs "libc") ,(glibc-dynamic-linker)))) + (system (string-append patchelf " --set-rpath \"$LIBRARY_PATH\" --set-interpreter " dynamic-linker " " binary)) + #t)))))) + (synopsis "Myteam") + (description "Myteam") + (home-page "https://dl.internal.myteam.mail.ru//") + (native-inputs `(("patchelf" ,patchelf))) + (inputs `(("libxrandr" ,libxrandr) + ("libxcomposite" ,libxcomposite) + ("libxcursor" ,libxcursor) + ("libxdamage" ,libxdamage) + ("libgpg-error" ,libgpg-error) + ("glibc" ,glibc) + ("libfontconfig" ,fontconfig) + ("libxinerama" ,libxinerama))) + (license gpl3+))) diff --git a/mychannel/packages/oping.scm b/mychannel/packages/oping.scm new file mode 100644 index 0000000..6da9ed0 --- /dev/null +++ b/mychannel/packages/oping.scm @@ -0,0 +1,31 @@ + +(define-module (mychannel packages oping) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (gnu packages perl) + #:use-module (gnu packages elf) + #:use-module (guix build-system gnu)) + +(define (liboping version checksum) + (package + (name "liboping") + (version version) + (source (origin + (method url-fetch) + (uri (string-append "https://noping.cc/files/liboping-" version ".tar.bz2")) + (sha256 (base32 checksum)))) + (build-system gnu-build-system) + (supported-systems '("x86_64-linux")) + (inputs + `( + ("perl" ,perl))) + (synopsis "octo's ping library") + (description "octo's ping library") + (home-page "https://noping.cc") + (license lgpl2.1))) + +(define-public liboping-1.10.0 + (liboping "1.10.0" "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b")) + +(define-public liboping liboping-1.10.0) diff --git a/mychannel/packages/rust-nightly.scm b/mychannel/packages/rust-nightly.scm new file mode 100644 index 0000000..99741c9 --- /dev/null +++ b/mychannel/packages/rust-nightly.scm @@ -0,0 +1,101 @@ + +(define-module (mychannel packages rust-nightly) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (gnu packages gcc) + #:use-module (gnu packages base) + #:use-module (gnu packages elf) + #:use-module (gnu packages cmake) + #:use-module (gnu packages bootstrap) + #:use-module (gnu packages compression) + #:use-module (guix build-system copy) + #:export (make-rust-nightly + make-rust-src-nightly)) + +(define (make-rust-nightly timestamp checksum) + (package + (name "rust") + (version (string-append "nightly-" timestamp)) + (source (origin + (method url-fetch) + (uri (string-append "https://static.rust-lang.org/dist/" timestamp "/rust-nightly-x86_64-unknown-linux-gnu.tar.xz")) + (sha256 (base32 checksum)))) + (build-system copy-build-system) + (supported-systems '("x86_64-linux")) + (arguments + `( + #:phases + (modify-phases + %standard-phases + (add-after + 'strip 'fix-binary + (lambda* + (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (patchelf (string-append (assoc-ref inputs "patchelf") "/bin/patchelf")) + (bin-masks + (string-append + out "/bin/rustc " + out "/bin/rustdoc " + out "/bin/rustfmt " + out "/bin/cargo " + out "/bin/cargo-fmt " + out "/bin/rust-analyzer " + out "/lib/rustlib/x86_64-unknown-linux-gnu/bin/*")) + (lib-masks (string-append + out "/lib/*.so " + out "/lib/rustlib/x86_64-unknown-linux-gnu/lib/*.so")) + (dynamic-linker (string-append (assoc-ref inputs "libc") ,(glibc-dynamic-linker)))) + (system (string-append patchelf " --set-rpath \"$LIBRARY_PATH:" out "/lib\" --set-interpreter " dynamic-linker " " bin-masks)) + (system (string-append patchelf " --set-rpath \"$LIBRARY_PATH:" out "/lib\" " lib-masks)) + #t)))) + #:install-plan + `(("rustc/bin/rustc" "bin/") + ("rustc/bin/rustdoc" "bin/") + ("rustc/bin/rust-gdb" "bin/") + ("rustc/bin/rust-gdbgui" "bin/") + ("rustc/bin/rust-lldb" "bin/") + ("rustfmt-preview/bin/cargo-fmt" "bin/") + ("rustfmt-preview/bin/rustfmt" "bin/") + ("rust-analyzer-preview/bin/rust-analyzer" "bin/") + ("cargo/bin/cargo" "bin/") + ("rustc/lib" "lib") + ("rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "lib/rustlib/x86_64-unknown-linux-gnu/lib")))) + (native-inputs `(("patchelf" ,patchelf))) + (inputs + `(("libstdc++" ,(make-libstdc++ gcc)) + ("gcc:lib" ,(canonical-package gcc) "lib") + ("glibc" ,glibc) + ("cmake" ,cmake) + ("zlib" ,zlib))) + (synopsis "Compiler for the Rust programming language") + (description "Rust is a systems programming language that provides memory safety and thread safety guarantees.") + (home-page "https://www.rust-lang.org") + (license (list license:asl2.0 license:expat)))) + +(define (make-rust-src-nightly timestamp checksum) + (package + (name "rust-src") + (version (string-append "nightly-" timestamp)) + (source (origin + (method url-fetch) + (uri (string-append "https://static.rust-lang.org/dist/" timestamp "/rust-src-nightly.tar.xz")) + (sha256 (base32 checksum)))) + (build-system copy-build-system) + (supported-systems '("x86_64-linux")) + (arguments + `( + #:install-plan + `(("rust-src/lib/rustlib" "lib/")))) + (synopsis "Compiler for the Rust programming language - stdlib sources") + (description "Rust is a systems programming language that provides memory safety and thread safety guarantees.") + (home-page "https://www.rust-lang.org") + (license (list license:asl2.0 license:expat)))) + +(define-public rust-nightly-2021.05.21 + (make-rust-nightly "2021-05-21" "1r3b45krsaffbpbnla02y797x1lab5hp4x95mrp2bkq0clyzyk70")) + +(define-public rust-src-nightly-2021.05.21 + (make-rust-src-nightly "2021-05-21" "06k4a7j69x2yqkmksihnjkwiy0f3amh1iykscka0iykdfwh2mcsg")) |
