From 78555900c33dabc48bccd8b87976069c2f70ba88 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Thu, 29 Sep 2022 15:06:32 -0600 Subject: [PATCH] Cleanup --- .gitignore | 1 + discord.scm | 128 ------------------ .../ledger-secp256k1.patch | 0 metznet.scm | 2 +- nvidia_icd.json | 7 - nvidia_layers.json | 21 --- 6 files changed, 2 insertions(+), 157 deletions(-) create mode 100644 .gitignore delete mode 100644 discord.scm rename ledger-secp256k1.patch => files/ledger-secp256k1.patch (100%) delete mode 100644 nvidia_icd.json delete mode 100644 nvidia_layers.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b511ae1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.qcow2 diff --git a/discord.scm b/discord.scm deleted file mode 100644 index 2f77030..0000000 --- a/discord.scm +++ /dev/null @@ -1,128 +0,0 @@ -(define-module (discord) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system trivial) - #:use-module (guix gexp) - #:use-module (gnu packages base) - #:use-module (gnu packages nss) - #:use-module (gnu packages bootstrap) - #:use-module (gnu packages xml) - #:use-module (gnu packages elf) - #:use-module (gnu packages compression) - #:use-module (gnu packages linux) - #:use-module (gnu packages gtk) - #:use-module (gnu packages cups) - #:use-module (gnu packages glib) - #:use-module (gnu packages fontutils) - #:use-module (gnu packages gnome) - #:use-module (gnu packages xorg) - #:use-module (gnu packages gnuzilla) - #:use-module (gnu packages llvm) - #:use-module (gnu packages pulseaudio) - #:use-module (gnu packages video) - #:use-module (gnu packages gcc)) - -;;(use-modules (guix licenses)) -;(discord) -(define-public discord - (package - (name "discord") - (version "0.0.16") - (source (origin - (method url-fetch) - (uri (string-append "https://dl.discordapp.net/apps/linux/" - version - "/" - name - "-" - version - ".tar.gz")) - (sha256 - (base32 - "1s9qym58cjm8m8kg3zywvwai2i3adiq6sdayygk2zv72ry74ldai")))) - (build-system trivial-build-system) - (propagated-inputs (list gzip )) - (inputs `(("alsa-lib" ,alsa-lib) - ("atk" ,atk) - ("at-spi2-atk" ,at-spi2-atk) - ("cairo" ,cairo) - ("cups" ,cups) - ("dbus" ,dbus) - ("expat" ,expat) - ("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("gdk-pixbuf" ,gdk-pixbuf) - ("glib" ,glib) - ("gtk3" ,gtk+) - ("libnotify" ,libnotify) - ("libx11" ,libx11) - ("libxcomposite" ,libxcomposite) - ("libxcursor" ,libxcursor) - ("libxdamage" ,libxdamage) - ("libuuid" ,util-linux) - ("libxext" ,libxext) - ("libxfixes" ,libxfixes) - ("libxi" ,libxi) - ("libxrandr" ,libxrandr) - ("libxrender" ,libxrender) - ("libxtst" ,libxtst) - ("nspr" ,nspr) - ("nss" ,nss) - ("libxcb" ,libxcb) - ("pango" ,pango) - ("libxscrnsaver" ,libxscrnsaver) - ("libcxx" ,clang-runtime) - ("libpulseaudio" ,pulseaudio) - ("libffmpeg" ,ffmpeg) - ("libgcc" ,gcc "lib") - ("libcxx" ,libcxx) - ("fontconfig" ,fontconfig))) - (native-inputs `(("patchelf" ,patchelf) - ("glibc" ,glibc) - ("tar" ,tar) - ("gzip" ,gzip))) - (arguments - `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (srfi srfi-26)) - (let* ((patchelf (assoc-ref %build-inputs "patchelf")) - (glibc (assoc-ref %build-inputs "glibc")) - (source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (gzip (assoc-ref %build-inputs "gzip")) - (output (assoc-ref %outputs "out"))) - (define libpath "") - (for-each - (lambda (i) - (set! libpath - (string-append libpath (string-append (cdr i) "/lib") ":"))) - %build-inputs) - (set! libpath - (string-append libpath (assoc-ref %build-inputs "nss") "/lib/nss")) - (setenv "PATH" (string-append gzip "/bin")) - (mkdir-p (string-append output "/opt/discord")) - (invoke (string-append tar "/bin/tar") "xpvf" source) - (copy-recursively "./Discord" (string-append output "/opt/discord")) - (mkdir-p (string-append output "/bin")) - (mkdir-p (string-append output "/share/pixmaps")) - (chmod (string-append output "/opt/discord/Discord") #o755) - (let ((output-port (open-file (string-append output "/bin/discord") "a"))) - (display "#!/bin/sh\n" output-port) - (display (string-append "cd " output "/opt/discord\n") output-port) - (display (string-append "LD_LIBRARY_PATH=" libpath " " "./Discord\n") output-port) - (close output-port)) - (chmod (string-append output "/bin/discord") #o755) - (invoke (string-append patchelf "/bin/patchelf") - "--set-interpreter" - (string-append glibc "/lib/ld-linux-x86-64.so.2") - (string-append output "/opt/discord/Discord")) - ;(link (string-append %output "/opt/discord/Discord") - ; (string-append %output "/bin/discord")) - (link (string-append %output "/opt/discord/discord.png") - (string-append %output "/share/pixmaps/discord.png")) - #t)))) - (synopsis "Discord chat client.") - (description "Discord chat client.") - (license #f) - (home-page "https://discordapp.com"))) diff --git a/ledger-secp256k1.patch b/files/ledger-secp256k1.patch similarity index 100% rename from ledger-secp256k1.patch rename to files/ledger-secp256k1.patch diff --git a/metznet.scm b/metznet.scm index 1bd4ad4..ad0fa0a 100644 --- a/metznet.scm +++ b/metznet.scm @@ -100,7 +100,7 @@ (file-name (git-file-name name version)) (sha256 (base32 "1qmn8ivysdx2j9y65y6alfmd57f7xnh9j6i6fjwijadj2lgxwxza")) - (patches (search-patches "ledger-secp256k1.patch")))) + (patches (search-patches "files/ledger-secp256k1.patch")))) (build-system cmake-build-system) (arguments (list diff --git a/nvidia_icd.json b/nvidia_icd.json deleted file mode 100644 index c538cd8..0000000 --- a/nvidia_icd.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "file_format_version" : "1.0.0", - "ICD": { - "library_path": "/gnu/store/cwl3mwqrs2nnj36zzmvhb5hp75xrb0hx-nvidia-libs-465.27/lib/libGLX_nvidia.so.0", - "api_version" : "1.0.49" - } -} diff --git a/nvidia_layers.json b/nvidia_layers.json deleted file mode 100644 index 7b1117b..0000000 --- a/nvidia_layers.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "file_format_version" : "1.0.0", - "layer": { - "name": "VK_LAYER_NV_optimus", - "type": "INSTANCE", - "library_path": "libGLX_nvidia.so.0", - "api_version" : "1.2.186", - "implementation_version" : "1", - "description" : "NVIDIA Optimus layer", - "functions": { - "vkGetInstanceProcAddr": "vk_optimusGetInstanceProcAddr", - "vkGetDeviceProcAddr": "vk_optimusGetDeviceProcAddr" - }, - "enable_environment": { - "__NV_PRIME_RENDER_OFFLOAD": "1" - }, - "disable_environment": { - "DISABLE_LAYER_NV_OPTIMUS_1": "" - } - } -}