Last active
December 15, 2017 22:29
-
-
Save cmiles74/ecb7417e9e7d1a9d5f9e330d6008dd45 to your computer and use it in GitHub Desktop.
Snapd Nix Package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source $stdenv/setup | |
version="2.29.4" | |
_gourl=github.com/snapcore/snapd | |
srcdir=$PWD/$name | |
mkdir -p $out | |
export GOPATH=$PWD/$name/go | |
mkdir -p $GOPATH | |
mkdir -p "$(dirname "$GOPATH/src/${_gourl}")" | |
ln --no-target-directory -fs "$PWD/$name/$snapd" "$GOPATH/src/${_gourl}" | |
cd "$GOPATH/src/${_gourl}" | |
export XDG_CONFIG_HOME="$srcdir" | |
go install "${_gourl}/cmd/snap" | |
go install "${_gourl}/cmd/snapd" | |
make -C data/systemd all | |
./mkversion.sh $version | |
cd cmd | |
autoreconf -a -f | |
./configure \ | |
--prefix=/usr \ | |
--libexecdir=/usr/lib/snapd \ | |
--with-snap-mount-dir=/var/lib/snapd/snap \ | |
--disable-apparmor \ | |
--enable-nvidia-arch \ | |
--enable-merged-usr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl, makeWrapper, go, python, docutils, libcap, | |
systemd, xfsprogs, autoconf }: | |
with stdenv.lib; | |
stdenv.mkDerivation rec { | |
name = "snapd-${version}"; | |
version = "2.29.4"; | |
src = fetchurl { | |
url = "https://github.com/snapcore/snapd/archive/${version}.tar.gz"; | |
sha256 = "f10135034c934d0fd937345a0e961312971b02dd100823b87487c02b7c60b101"; | |
}; | |
builder = ./builder.sh; | |
buildInputs = [ go python docutils libcap systemd xfsprogs autoconf ]; | |
meta = { | |
description = "Package any app for ever Linux desktop, server, cloud or device"; | |
homepage = "http://snapcraft.io"; | |
license = licenses.gpl3; | |
platforms = platforms.unix; | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment