mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2025-10-02 02:14:59 +00:00
Compare commits
7 commits
a52f5215cf
...
e2667e47b7
Author | SHA1 | Date | |
---|---|---|---|
|
e2667e47b7 | ||
|
94c750ad59 | ||
|
382df31152 | ||
|
bfe682b9ab | ||
|
70a0de71d0 | ||
|
5c13dbf132 | ||
|
0811af822c |
5 changed files with 178 additions and 17 deletions
|
@ -37,7 +37,7 @@
|
|||
(define-public element-desktop
|
||||
(package
|
||||
(name "element-desktop")
|
||||
(version "1.11.103")
|
||||
(version "1.11.104")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -46,7 +46,7 @@
|
|||
"https://packages.riot.im/debian/pool/main/e/" name "/" name "_" version
|
||||
"_amd64.deb"))
|
||||
(sha256
|
||||
(base32 "1apnj9n428lc9cw6jlmnqhcywqd6fnplkj3j5k731f2dzvzaifs6"))))
|
||||
(base32 "1b1rzcsf0pdgccsl0cmrp9lnrcbhy50ygwkwik7hdnygr2721mbl"))))
|
||||
(supported-systems '("x86_64-linux"))
|
||||
(build-system chromium-binary-build-system)
|
||||
(arguments
|
||||
|
@ -83,7 +83,7 @@ its core.")
|
|||
(define-public signal-desktop
|
||||
(package
|
||||
(name "signal-desktop")
|
||||
(version "7.57.0")
|
||||
(version "7.58.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
|
@ -92,7 +92,7 @@ its core.")
|
|||
"https://updates.signal.org/desktop/apt/pool/s/" name "/" name "_" version
|
||||
"_amd64.deb"))
|
||||
(sha256
|
||||
(base32 "0xy4xfyx58v0869x0inypy9rgnbcxzrdnfh3r8qq00640wfj9j2c"))))
|
||||
(base32 "1bhh9z7mclxlzq4pfs695pnkb5x36wm5ihniydvzqqi2g3xjbqam"))))
|
||||
(supported-systems '("x86_64-linux"))
|
||||
(build-system chromium-binary-build-system)
|
||||
(arguments
|
||||
|
|
|
@ -228,9 +228,9 @@ ACTION==\"unbind\", SUBSYSTEM==\"pci\", ATTR{vendor}==\"0x10de\", ATTR{class}==\
|
|||
(define-public nvidia-driver
|
||||
(package
|
||||
(name "nvidia-driver")
|
||||
(version "570.153.02")
|
||||
(version "570.169")
|
||||
(source (nvidia-source
|
||||
version "1dp1bpx4scx7lzqnajn75q5zjlbfvpjych3ils7zlxlmyvj8d20l"))
|
||||
version "0r9phz9rv0n208f61lvv3m492387mjmqk4gph3ww7iawg53shcjz"))
|
||||
(build-system copy-build-system)
|
||||
(arguments
|
||||
(list #:modules '((guix build copy-build-system)
|
||||
|
@ -627,9 +627,9 @@ add @code{nvidia_drm.modeset=1} to @code{kernel-arguments} as well.")
|
|||
(define-public nvidia-settings
|
||||
(package
|
||||
(name "nvidia-settings")
|
||||
(version "570.153.02")
|
||||
(version "570.169")
|
||||
(source (nvidia-settings-source
|
||||
name version "1qvvsrhlswpnv9aldqnynjch8y1x219ccsk3w4rfrw3swxm9qvp6"))
|
||||
name version "15sxzczan9kq55hyiq73arls95lsdakpfbbzf4b6741fjfgd8kfh"))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
(list #:tests? #f ;no test suite
|
||||
|
|
97
nonguix/build-system/dotnet.scm
Normal file
97
nonguix/build-system/dotnet.scm
Normal file
|
@ -0,0 +1,97 @@
|
|||
(define-module (nonguix nonguix build-system dotnet)
|
||||
#:use-module (guix store)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (guix monads)
|
||||
#:use-module (guix derivations)
|
||||
#:use-module (guix search-paths)
|
||||
#:use-module (guix build-system)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system copy)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:export (%dotnet-build-system-modules
|
||||
default-dotnet
|
||||
lower
|
||||
dotnet-build
|
||||
dotnet-build-system))
|
||||
|
||||
(define %dotnet-build-system-modules
|
||||
`((nonguix build dotnet-build-system)
|
||||
(gnu build utils)))
|
||||
|
||||
(define (default-dotnet)
|
||||
(let ((module (resolve-interface '(nongnu packages dotnet))))
|
||||
(module-ref module 'dotnet)))
|
||||
|
||||
(define* (lower name
|
||||
#:key source inputs native-inputs outputs system target
|
||||
(dotnet (default-dotnet))
|
||||
#:allow-other-keys
|
||||
#:rest arguments)
|
||||
"Return a bag for NAME."
|
||||
(define private-keywords
|
||||
'(#:target #:inputs #:native-inputs))
|
||||
(and (not target)
|
||||
(bag
|
||||
(name name)
|
||||
(system system)
|
||||
(host-inputs `(("dotnet" ,dotnet)
|
||||
,@inputs
|
||||
,@(standard-packages)))
|
||||
(build-inputs `(,@native-inputs))
|
||||
(outputs outputs)
|
||||
(build dotnet-build)
|
||||
(arguments (strip-keyword-arguments private-keywords arguments)))))
|
||||
|
||||
(define* (dotnet-build name inputs
|
||||
#:key
|
||||
guile source
|
||||
(outputs '("out"))
|
||||
(project-name #f)
|
||||
(nuget? #f)
|
||||
(self-contained? #t)
|
||||
(strip-debug-symbols? #t)
|
||||
(search-paths '())
|
||||
(path-shebangs? #t)
|
||||
(phases '(@ (nonguix build dotnet-build-system) %standard-phases))
|
||||
(system (%current-system))
|
||||
(imported-modules %dotnet-build-system-modules)
|
||||
(modules '((nonguix build dotnet-build-system)
|
||||
(guix build utils)))
|
||||
(substitutable? #t)
|
||||
allowed-references
|
||||
disallowed-references)
|
||||
"Build SOURCE using DOTNET, and with INPUTS."
|
||||
(define builder
|
||||
(with-imported-modules imported-modules
|
||||
#~(begin
|
||||
(use-modules #$@modules)
|
||||
#$(with-build-variables inputs outputs
|
||||
#~(dotnet-build #:source #+source
|
||||
#:system #$system
|
||||
#:outputs %outputs
|
||||
#:inputs %build-inputs
|
||||
#:project-name #$project-name
|
||||
#:nuget? #$nuget?
|
||||
#:self-contained? #$self-contained?
|
||||
#:strip-debug-symbols? #$strip-debug-symbols?
|
||||
#:search-paths '#$(map search-path-specification->sexp search-paths)
|
||||
#:phases #$phases
|
||||
#:patch-shebangs? #$patch-shebangs?)))))
|
||||
(mlet %store-monad ((guile (package->derivation (or guiled (default-guile))
|
||||
system #:graft? #f)))
|
||||
(gexp->derivation name builder
|
||||
#:system system
|
||||
#:target #f
|
||||
#:substitutable substitutable?
|
||||
#:allowed-references allowed-references
|
||||
#:disallowed-references disallowed-references
|
||||
#:guile-for-build guile)))
|
||||
|
||||
(define dotnet-build-system
|
||||
(build-system
|
||||
(name 'dotnet)
|
||||
(description "")
|
||||
(lower lower)))
|
59
nonguix/build/dotnet-build-system.scm
Normal file
59
nonguix/build/dotnet-build-system.scm
Normal file
|
@ -0,0 +1,59 @@
|
|||
(define-module (build dotnet-build-system)
|
||||
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (ice-9 match)
|
||||
#:export (%standard-phases
|
||||
dotnet-build))
|
||||
|
||||
(define* (dotnet-env #:allow-other-keys)
|
||||
(let* ((directory (or (getenv "TMPDIR") "/tmp"))
|
||||
(template (string-append directory "/dotnet-fake-home.XXXXXX"))
|
||||
(home (mkdtemp template)))
|
||||
;; Dotnet expects a writeable home directory for it's configuration files.
|
||||
(setenv "HOME" home)
|
||||
;; Don't try to expand NuGetFallbackFolder to disk
|
||||
(setenv "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" "1")
|
||||
;; Disable the welcome message
|
||||
(setenv "DOTNET_NOLOGO" "1")
|
||||
(setenv "DOTNET_CLI_TELEMETRY_OPTOUT" "1")))
|
||||
|
||||
(define* (copy-nuget-inputs #:key inputs #:allow-other-keys)
|
||||
"Link nuget inputs into a central place so DOTNET can restore them."
|
||||
(define (copy-input input)
|
||||
(copy-file input (string-append "./nugets/" (strip-store-file-name input))))
|
||||
(begin
|
||||
(mkdir "nugets")
|
||||
(for-each copy-input inputs)))
|
||||
|
||||
(define* (restore-nuget-inputs #:key inputs #:allow-other-keys)
|
||||
"Run DOTNET restore --source ./nugets"
|
||||
(invoke "dotnet" "restore" "--source" "./nugets"))
|
||||
|
||||
(define* (publish #:key output (project-name #f) (nuget? #f) (self-contained? #t) (strip-debug-symbols? #t) #:allow-other-keys)
|
||||
"Run DOTNET publish or DOTNET pack"
|
||||
(define arguments `(,@(if nuget? "pack" "publish")
|
||||
,@(if project-name (list project-name) '())
|
||||
"--configuration" "Release"
|
||||
;; don't try to access nuget.org, use local cache prepared in restore-nuget-inputs
|
||||
"--no-restore"
|
||||
,@(if self-contained? '("--self-contained") '())
|
||||
;; TODO cross-compilation
|
||||
"--target" "linux-x64"
|
||||
"-p:UseAppHost=true"
|
||||
,@(if strip-debug-symbols? '("-p:DebugSymbols=false" "-p:DebugType=none") '())
|
||||
"--output" output)))
|
||||
|
||||
(define %standard-phases
|
||||
(modify-phases gnu:%standard-phases)
|
||||
(delete 'bootstrap)
|
||||
(delete 'configure)
|
||||
(delete 'build)
|
||||
(add-before 'check dotnet-env)
|
||||
(add-before 'check copy-nuget-inputs)
|
||||
(add-before 'check publish)
|
||||
(replace 'install publish))
|
||||
|
||||
(define* (dotnet-build #:key inputs (phases %standard-phases)
|
||||
#:allow-other-keys #:rest args)
|
||||
"Build the given package, applying all of PHASES in order."
|
||||
(apply gnu:gnu-build #:inputs inputs #:phases phases args))
|
|
@ -2,6 +2,8 @@
|
|||
;;; Copyright © 2025 Hilton Chain <hako@ultrarare.space>
|
||||
|
||||
(define-module (nonguix transformations)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (guix channels)
|
||||
#:use-module (guix diagnostics)
|
||||
#:use-module (guix gexp)
|
||||
|
@ -74,10 +76,11 @@ FIXME: GUIX-SOURCE? is disabled by default due to performance issue."
|
|||
(cons %nonguix-signing-key
|
||||
(guix-configuration-authorized-keys config)))
|
||||
(substitute-urls
|
||||
`(,@(guix-configuration-substitute-urls config)
|
||||
,@(if substitutes?
|
||||
'("https://substitutes.nonguix.org")
|
||||
'()))))))))))
|
||||
(delete-duplicates
|
||||
`(,@(guix-configuration-substitute-urls config)
|
||||
,@(if substitutes?
|
||||
'("https://substitutes.nonguix.org")
|
||||
'())))))))))))
|
||||
|
||||
(define* (nonguix-transformation-linux #:key (linux linux)
|
||||
(firmware (list linux-firmware))
|
||||
|
@ -128,11 +131,13 @@ TODO: Xorg configuration."
|
|||
(operating-system
|
||||
(inherit os)
|
||||
(kernel-arguments
|
||||
`("modprobe.blacklist=nouveau"
|
||||
,@(if kernel-mode-setting?
|
||||
'("nvidia_drm.modeset=1")
|
||||
'())
|
||||
,@(operating-system-user-kernel-arguments os)))
|
||||
(delete-duplicates
|
||||
(cons* "modprobe.blacklist=nouveau"
|
||||
(string-append
|
||||
"nvidia_drm.modeset=" (if kernel-mode-setting? "1" "0"))
|
||||
(remove
|
||||
(cut string-prefix? "nvidia_drm.modeset=" <>)
|
||||
(operating-system-user-kernel-arguments os)))))
|
||||
(services
|
||||
`(,(or (assoc-ref %presets driver)
|
||||
(leave
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue