From a00e54db62613109e9d37e7e662c8d39a616be0c Mon Sep 17 00:00:00 2001 From: Evgenii Lepikhin Date: Fri, 28 May 2021 12:44:55 +0300 Subject: feat: Renamed top-level directory --- johnlepikhin/packages/myteam.scm | 102 +++++++++++++++++++++++++++++++++ johnlepikhin/packages/oping.scm | 31 ++++++++++ johnlepikhin/packages/rust-nightly.scm | 101 ++++++++++++++++++++++++++++++++ mychannel/packages/myteam.scm | 102 --------------------------------- mychannel/packages/oping.scm | 31 ---------- mychannel/packages/rust-nightly.scm | 101 -------------------------------- 6 files changed, 234 insertions(+), 234 deletions(-) create mode 100644 johnlepikhin/packages/myteam.scm create mode 100644 johnlepikhin/packages/oping.scm create mode 100644 johnlepikhin/packages/rust-nightly.scm delete mode 100644 mychannel/packages/myteam.scm delete mode 100644 mychannel/packages/oping.scm delete mode 100644 mychannel/packages/rust-nightly.scm diff --git a/johnlepikhin/packages/myteam.scm b/johnlepikhin/packages/myteam.scm new file mode 100644 index 0000000..d88d9a2 --- /dev/null +++ b/johnlepikhin/packages/myteam.scm @@ -0,0 +1,102 @@ +(define-module (johnlepikhin 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/johnlepikhin/packages/oping.scm b/johnlepikhin/packages/oping.scm new file mode 100644 index 0000000..1029789 --- /dev/null +++ b/johnlepikhin/packages/oping.scm @@ -0,0 +1,31 @@ + +(define-module (johnlepikhin 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/johnlepikhin/packages/rust-nightly.scm b/johnlepikhin/packages/rust-nightly.scm new file mode 100644 index 0000000..e8b7528 --- /dev/null +++ b/johnlepikhin/packages/rust-nightly.scm @@ -0,0 +1,101 @@ + +(define-module (johnlepikhin 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")) diff --git a/mychannel/packages/myteam.scm b/mychannel/packages/myteam.scm deleted file mode 100644 index ac879d9..0000000 --- a/mychannel/packages/myteam.scm +++ /dev/null @@ -1,102 +0,0 @@ -(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 deleted file mode 100644 index 6da9ed0..0000000 --- a/mychannel/packages/oping.scm +++ /dev/null @@ -1,31 +0,0 @@ - -(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 deleted file mode 100644 index 99741c9..0000000 --- a/mychannel/packages/rust-nightly.scm +++ /dev/null @@ -1,101 +0,0 @@ - -(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")) -- cgit v1.3