2022-06-03 14:01:13 +02:00
( define-module ( glicid packages containers )
2023-02-08 20:20:11 +00:00
# :use-module ( guix download )
# :use-module ( guix git-download )
# :use-module ( guix packages )
# :use-module ( guix gexp )
# :use-module ( ( guix licenses ) # :prefix license: )
# :use-module ( ( gnu packages containers ) # :prefix gnu: )
# :use-module ( gnu packages linux )
# :use-module ( gnu packages gnupg )
# :use-module ( gnu packages golang )
# :use-module ( gnu packages selinux )
# :use-module ( gnu packages bash )
# :use-module ( gnu packages python )
2023-06-23 09:11:38 +00:00
# :use-module ( gnu packages file-systems )
2023-02-08 20:20:11 +00:00
# :use-module ( gnu packages version-control )
# :use-module ( gnu packages pkg-config )
# :use-module ( guix utils )
# :use-module ( guix build-system gnu ) )
2022-06-03 14:01:13 +02:00
2022-09-04 20:02:32 +02:00
( define-public podman
2023-02-08 20:20:11 +00:00
( package
( name "podman" )
2023-06-11 12:17:03 +02:00
( version "4.5.1" )
2023-02-08 20:20:11 +00:00
( source
( origin
( method git-fetch )
( uri ( git-reference
( url "https://github.com/containers/podman" )
( commit ( string-append "v" version ) ) ) )
2023-06-11 12:17:03 +02:00
( sha256 ( base32 "145v7cq1y1v5kjdlg0vl70y693flagw4m60vm95wizibrf4byv9w" ) )
2023-02-08 20:20:11 +00:00
( modules ' ( ( guix build utils ) ) )
( snippet ' ( begin
2023-06-23 09:11:38 +00:00
; (substitute* "Makefile" ((".*hack/btrfs.*") ""))
2023-02-08 20:20:11 +00:00
; we build without doc
( substitute* "Makefile" ( ( "all: binaries docs" ) "all: binaries" ) )
( substitute* "Makefile" ( ( "install: install.bin install.remote install.man install.systemd" ) "install: install.bin install.remote install.systemd" ) ) ) ) ) )
( build-system gnu-build-system )
( arguments
( list
# :make-flags
# ~ ( list # $ ( string-append "CC=" ( cc-for-target ) )
( string-append "PREFIX=" # $output ) )
# :tests? #f
# :test-target "test"
# :phases
# ~ ( modify-phases %standard-phases
( delete 'configure )
( add-after 'unpack 'set-env
( lambda* ( # :key inputs # :allow-other-keys )
( setenv "HOME" "/tmp" ) ) )
( replace 'check
( lambda* ( # :key tests? # :allow-other-keys )
( when tests?
( invoke "make" "localsystem" )
( invoke "make" "remotesystem" ) ) ) )
( add-after 'unpack 'fix-hardcoded-paths
( lambda _
( substitute* ( find-files "libpod" "\\.go" )
( ( "exec.LookPath[(][\"]slirp4netns[\"][)]" ) ( string-append "exec.LookPath(\"" ( which "slirp4netns" ) "\")" ) ) )
( substitute* "hack/install_catatonit.sh"
( ( "CATATONIT_PATH=\"[^\"]+\"" ) ( string-append "CATATONIT_PATH=" ( which "true" ) ) ) )
( substitute* "vendor/github.com/containers/common/pkg/config/config_linux.go"
( ( "/usr/local/libexec/podman" ) ( string-append # $output "/bin" ) ) )
( substitute* "vendor/github.com/containers/common/pkg/config/default.go"
( ( "/usr/libexec/podman/conmon" ) ( which "conmon" ) )
( ( "/usr/local/libexec/cni" ) ( string-append # $ ( this-package-input "cni-plugins" ) "/bin" ) )
( ( "/usr/bin/crun" ) ( which "crun" ) ) ) ) )
( add-after 'install 'install-completions
( lambda _
( invoke "make" "install.completions"
( string-append "PREFIX=" # $output ) ) ) ) ) ) )
2023-06-23 09:11:38 +00:00
( inputs ( list btrfs-progs gnu:cni-plugins gnu:conmon gnu:crun gpgme go-github-com-go-md2man iptables libassuan libseccomp libselinux gnu:slirp4netns fuse-overlayfs ) )
2023-02-08 20:20:11 +00:00
( native-inputs ( list bats git go-1 . 18 pkg-config python ) )
2023-06-23 09:11:38 +00:00
( propagated-inputs ( list fuse-overlayfs ) )
2023-02-08 20:20:11 +00:00
( home-page "https://podman.io" )
( synopsis "Manage containers, images, pods, and their volumes" )
( description "Podman (the POD MANager) is a tool for managing containers and images, volumes mounted into those containers, and pods made from groups of containers." )
( license license:asl2 . 0 ) ) )
2023-06-30 09:34:18 +02:00
( define-public podman-with-overlayfs
( package
( name "podman" )
( version "4.5.1" )
( source
( origin
( method git-fetch )
( uri ( git-reference
( url "https://github.com/containers/podman" )
( commit ( string-append "v" version ) ) ) )
2023-06-11 12:17:03 +02:00
( sha256 ( base32 "145v7cq1y1v5kjdlg0vl70y693flagw4m60vm95wizibrf4byv9w" ) )
2023-02-08 20:20:11 +00:00
( modules ' ( ( guix build utils ) ) )
( snippet ' ( begin
( substitute* "Makefile" ( ( ".*hack/btrfs.*" ) "" ) )
; we build without doc
( substitute* "Makefile" ( ( "all: binaries docs" ) "all: binaries" ) )
( substitute* "Makefile" ( ( "install: install.bin install.remote install.man install.systemd" ) "install: install.bin install.remote install.systemd" ) ) ) ) ) )
( build-system gnu-build-system )
( arguments
( list
# :make-flags
# ~ ( list # $ ( string-append "CC=" ( cc-for-target ) )
( string-append "PREFIX=" # $output ) )
# :tests? #f
# :test-target "test"
# :phases
# ~ ( modify-phases %standard-phases
( delete 'configure )
( add-after 'unpack 'set-env
( lambda* ( # :key inputs # :allow-other-keys )
( setenv "HOME" "/tmp" ) ) )
( replace 'check
( lambda* ( # :key tests? # :allow-other-keys )
( when tests?
( invoke "make" "localsystem" )
( invoke "make" "remotesystem" ) ) ) )
( add-after 'unpack 'fix-hardcoded-paths
( lambda _
( substitute* ( find-files "libpod" "\\.go" )
( ( "exec.LookPath[(][\"]slirp4netns[\"][)]" ) ( string-append "exec.LookPath(\"" ( which "slirp4netns" ) "\")" ) ) )
( substitute* "hack/install_catatonit.sh"
( ( "CATATONIT_PATH=\"[^\"]+\"" ) ( string-append "CATATONIT_PATH=" ( which "true" ) ) ) )
( substitute* "vendor/github.com/containers/common/pkg/config/config_linux.go"
( ( "/usr/local/libexec/podman" ) ( string-append # $output "/bin" ) ) )
( substitute* "vendor/github.com/containers/common/pkg/config/default.go"
( ( "/usr/libexec/podman/conmon" ) ( which "conmon" ) )
( ( "/usr/local/libexec/cni" ) ( string-append # $ ( this-package-input "cni-plugins" ) "/bin" ) )
( ( "/usr/bin/crun" ) ( which "crun" ) ) ) ) )
( add-after 'install 'install-completions
( lambda _
( invoke "make" "install.completions"
( string-append "PREFIX=" # $output ) ) ) ) ) ) )
( inputs ( list btrfs-progs gnu:cni-plugins gnu:conmon gnu:crun gpgme go-github-com-go-md2man iptables libassuan libseccomp libselinux gnu:slirp4netns ) )
( native-inputs ( list bats git go-1 . 18 pkg-config python ) )
( home-page "https://podman.io" )
( synopsis "Manage containers, images, pods, and their volumes" )
( description "Podman (the POD MANager) is a tool for managing containers and images, volumes mounted into those containers, and pods made from groups of containers." )
( license license:asl2 . 0 ) ) )