summaryrefslogtreecommitdiff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix37
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols285
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols106
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/default.nix106
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix9
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix9
-rw-r--r--pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch17
-rw-r--r--pkgs/os-specific/darwin/usr-include/default.nix21
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/default.nix155
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch26
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch204
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch42
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch48
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch29
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch29
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch25
-rw-r--r--pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch112
-rw-r--r--pkgs/os-specific/linux/android-udev-rules/default.nix4
-rw-r--r--pkgs/os-specific/linux/apparmor/default.nix1
-rw-r--r--pkgs/os-specific/linux/broadcom-sta/default.nix9
-rw-r--r--pkgs/os-specific/linux/busybox/busybox-in-store.patch17
-rw-r--r--pkgs/os-specific/linux/busybox/default.nix4
-rw-r--r--pkgs/os-specific/linux/cachefilesd/default.nix25
-rw-r--r--pkgs/os-specific/linux/conky/default.nix6
-rw-r--r--pkgs/os-specific/linux/crda/default.nix4
-rw-r--r--pkgs/os-specific/linux/facetimehd/default.nix41
-rw-r--r--pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix2
-rw-r--r--pkgs/os-specific/linux/google-authenticator/default.nix9
-rw-r--r--pkgs/os-specific/linux/guvcview/default.nix2
-rw-r--r--pkgs/os-specific/linux/iotop/default.nix6
-rw-r--r--pkgs/os-specific/linux/jool/cli.nix4
-rw-r--r--pkgs/os-specific/linux/jool/default.nix2
-rw-r--r--pkgs/os-specific/linux/jool/source.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix11
-rw-r--r--pkgs/os-specific/linux/kernel/grsecurity-nixos-config.nix46
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.10.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.12.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-3.18.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.1.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.4.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-4.8.nix (renamed from pkgs/os-specific/linux/kernel/linux-4.7.nix)6
-rw-r--r--pkgs/os-specific/linux/kernel/linux-grsecurity.nix4
-rw-r--r--pkgs/os-specific/linux/kernel/linux-testing.nix8
-rw-r--r--pkgs/os-specific/linux/kernel/patches.nix6
-rw-r--r--pkgs/os-specific/linux/kernel/perf.nix4
-rw-r--r--pkgs/os-specific/linux/kmod/aggregator.nix4
-rw-r--r--pkgs/os-specific/linux/libselinux/default.nix8
-rw-r--r--pkgs/os-specific/linux/libsepol/default.nix4
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch40
-rw-r--r--pkgs/os-specific/linux/nvidia-x11/default.nix14
-rw-r--r--pkgs/os-specific/linux/powertop/default.nix12
-rw-r--r--pkgs/os-specific/linux/rtkit/default.nix18
-rw-r--r--pkgs/os-specific/linux/sysdig/default.nix37
-rw-r--r--pkgs/os-specific/linux/util-linux/default.nix14
-rw-r--r--pkgs/os-specific/linux/wireguard/default.nix6
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/default.nix5
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/gui.nix44
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/libressl.patch69
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/remove_inkscape.patch30
61 files changed, 1255 insertions, 605 deletions
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
index 27d2360a9800..aac213bb8047 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
@@ -56,9 +56,40 @@ appleDerivation rec {
# The startup object files
cp ${Csu}/lib/* $out/lib
- # OMG impurity
- ln -s /usr/lib/libSystem.B.dylib $out/lib/libSystem.B.dylib
- ln -s /usr/lib/libSystem.dylib $out/lib/libSystem.dylib
+ # Narrowly speaking, these would work if we re-exported libsystem_c and libsystem_kernel,
+ # but we also need to run the original central libsystem constructor (which initializes
+ # a ton of crap for its consitutent libraries) so we link against the central library here.
+ mkdir -p $out/lib/system
+ ld -macosx_version_min 10.7 -arch x86_64 -dylib \
+ -o $out/lib/system/libsystem_c.dylib \
+ /usr/lib/libSystem.dylib \
+ -reexported_symbols_list ${./system_c_symbols}
+
+ ld -macosx_version_min 10.7 -arch x86_64 -dylib \
+ -o $out/lib/system/libsystem_kernel.dylib \
+ /usr/lib/libSystem.dylib \
+ -reexported_symbols_list ${./system_kernel_symbols}
+
+ libs=$(otool -arch x86_64 -L /usr/lib/libSystem.dylib | tail -n +3 | awk '{ print $1 }')
+
+
+ for i in $libs; do
+ if [ "$i" != "/usr/lib/system/libsystem_kernel.dylib" ] && [ "$i" != "/usr/lib/system/libsystem_c.dylib" ]; then
+ args="$args -reexport_library $i"
+ fi
+ done
+
+ ld -macosx_version_min 10.7 \
+ -arch x86_64 \
+ -dylib \
+ -o $out/lib/libSystem.B.dylib \
+ -compatibility_version 1.0 \
+ -current_version 1226.10.1 \
+ -reexport_library $out/lib/system/libsystem_c.dylib \
+ -reexport_library $out/lib/system/libsystem_kernel.dylib \
+ $args
+
+ ln -s libSystem.B.dylib $out/lib/libSystem.dylib
# Set up links to pretend we work like a conventional unix (Apple's design, not mine!)
for name in c dbm dl info m mx poll proc pthread rpcsvc util gcc_s.10.4 gcc_s.10.5; do
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols
index 0c814899c3c4..e298ae47f72d 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols
@@ -1,14 +1,3 @@
-_NSGetNextSearchPathEnumeration
-_NSStartSearchPathEnumeration
-_OSAtomicAdd32
-_OSAtomicAdd32Barrier
-_OSAtomicAnd32
-_OSAtomicDequeue
-_OSAtomicEnqueue
-_OSSpinLockLock
-_OSSpinLockUnlock
-__Block_copy
-__Block_release
__CurrentRuneLocale
__DefaultRuneLocale
__Exit
@@ -62,20 +51,18 @@ ___bt_setcur
___bt_split
___bt_sync
___buf_free
-___bzero
___cVersionNumber
___cVersionString
___call_hash
-___chmod_extended
___cleanup
___cmp_D2A
___collate_equiv_match
___collate_load_error
___collate_lookup
-___commpage_gettimeofday
___copybits_D2A
___cxa_atexit
___cxa_finalize
+___cxa_finalize_ranges
___cxa_thread_atexit
___d2b_D2A
___dbpanic
@@ -85,34 +72,21 @@ ___default_utx
___delpair
___diff_D2A
___dtoa
-___error
-___exit
___expand_table
-___fchmod_extended
-___fcntl
-___fcntl_nocancel
___fflush
___fgetwc
___find_bigpair
___find_last_page
___fix_locale_grouping_str
-___fork
-___fpclassifyd
-___fpclassifyl
___fread
___free_ovflpage
___freedtoa
-___fstat64_extended
-___fstat_extended
___gdtoa
___gdtoa_locks
___get_buf
___get_page
-___getdirentries64
___gethex_D2A
-___getlogin
___getonlyClocaleconv
-___gettimeofday
___hash_open
___hdtoa
___hexdig_D2A
@@ -126,14 +100,11 @@ ___increment_D2A
___isctype
___istype
___istype_l
-___kill
___ldtoa
___libc_init
___lo0bits_D2A
___log2
___lshift_D2A
-___lstat64_extended
-___lstat_extended
___maskrune
___maskrune_l
___match_D2A
@@ -143,22 +114,15 @@ ___memccpy_chk
___memcpy_chk
___memmove_chk
___memset_chk
-___mkdir_extended
-___mkfifo_extended
___mult_D2A
___multadd_D2A
___nrv_alloc_D2A
-___open
-___open_extended
-___open_nocancel
___opendir2
___opendir2$INODE64
___ovfl_delete
___ovfl_get
___ovfl_put
___pow5mult_D2A
-___pthread_sigmask
-___pthread_workqueue_setkill
___put_page
___quorem_D2A
___ratio_D2A
@@ -179,29 +143,19 @@ ___rec_sync
___rec_vmap
___rec_vpipe
___reclaim_buf
-___recvfrom
-___recvfrom_nocancel
___rshift_D2A
___rv_alloc_D2A
___s2b_D2A
___sF
___sclose
___sdidinit
-___semwait_signal
-___semwait_signal_nocancel
-___sendto
-___sendto_nocancel
___set_ones_D2A
-___setlogin
___setonlyClocaleconv
-___settimeofday
___sflags
___sflush
___sfp
___sfvwrite
___sglue
-___sigaction
-___sigaltstack
___sinit
___slbexpand
___smakebuf
@@ -214,8 +168,6 @@ ___srget
___sseek
___stack_chk_fail
___stack_chk_guard
-___stat64_extended
-___stat_extended
___stderrp
___stdinp
___stdoutp
@@ -237,7 +189,6 @@ ___swbuf
___swhatbuf
___swrite
___swsetup
-___sysctl
___tens_D2A
___tinytens_D2A
___tolower
@@ -246,31 +197,25 @@ ___toupper
___toupper_l
___trailz_D2A
___ulp_D2A
-___umask_extended
___ungetc
___ungetwc
-___unix_conforming
___vsnprintf_chk
___vsprintf_chk
-___wait4
-___wait4_nocancel
___wcwidth
___wcwidth_l
__allocenvstate
+__atexit_receipt
__c_locale
__cleanup
__closeutx
__copyenv
__cthread_init_routine
__deallocenvstate
-__dyld_register_func_for_add_image
__endutxent
-__exit
__flockfile_debug_stub
__fseeko
__ftello
__fwalk
-__get_cpu_capabilities
__getenvp
__getutxent
__getutxid
@@ -279,34 +224,18 @@ __inet_aton_check
__init_clock_port
__int_to_time
__libc_fork_child
+__libc_initializer
__long_to_time
__mkpath_np
__mktemp
__openutx
-__os_alloc_once
-__os_alloc_once_table
__os_assert_log
__os_assert_log_ctx
__os_assumes_log
__os_assumes_log_ctx
__os_avoid_tail_call
-__osx_assert_log
-__osx_assert_log_ctx
-__osx_assumes_log
-__osx_assumes_log_ctx
-__osx_avoid_tail_call
-__platform_bzero
-__platform_memccpy
-__platform_memchr
-__platform_memcmp
-__platform_memmove
-__platform_memset
-__platform_memset_pattern16
-__platform_memset_pattern4
-__platform_memset_pattern8
-__platform_strchr
-__platform_strcmp
-__platform_strncmp
+__os_debug_log
+__os_debug_log_error_str
__putenvp
__pututxline
__rand48_add
@@ -322,20 +251,7 @@ __setutxent
__sigaction_nobind
__sigintr
__signal_nobind
-__sigtramp
__sigvec_nobind
-__simple_asl_log
-__simple_asl_log_prog
-__simple_asl_msg_new
-__simple_asl_msg_set
-__simple_asl_send
-__simple_dprintf
-__simple_salloc
-__simple_sappend
-__simple_sfree
-__simple_sprintf
-__simple_string
-__simple_vsprintf
__sread
__sseek
__swrite
@@ -345,14 +261,11 @@ __time_to_int
__time_to_long
__time_to_time32
__time_to_time64
-__tlv_atexit
-__tlv_exit
__unsetenvp
__utmpxname
_a64l
_abort
_abs
-_access
_acl_add_flag_np
_acl_add_perm
_acl_calc_mask
@@ -416,12 +329,6 @@ _arc4random_uniform
_ascii2addr
_asctime
_asctime_r
-_asl_get
-_asl_new
-_asl_open
-_asl_send
-_asl_set
-_asl_set_query
_asprintf
_asprintf_l
_asxprintf
@@ -442,8 +349,6 @@ _backtrace_symbols_fd
_basename
_bcmp
_bcopy
-_bootstrap_parent
-_bootstrap_port
_brk
_bsd_signal
_bsearch
@@ -451,7 +356,6 @@ _bsearch_b
_btowc
_btowc_l
_bzero
-_calloc
_catclose
_catgets
_catopen
@@ -471,17 +375,12 @@ _cgetnum
_cgetset
_cgetstr
_cgetustr
-_chdir
-_chflags
-_chmod
_chmodx_np
_clearerr
_clearerr_unlocked
_clock
-_clock_get_time
_clock_port
_clock_sem
-_close$NOCANCEL
_closedir
_compat_mode
_confstr
@@ -514,19 +413,13 @@ _digittoint
_digittoint_l
_dirfd
_dirname
-_dispatch_get_global_queue
_div
-_dladdr
-_dlsym
_dprintf
_dprintf_l
_drand48
-_dup2
_duplocale
_dxprintf
_dxprintf_exec
-_dyld_get_program_sdk_version
-_dyld_get_sdk_version
_ecvt
_encrypt
_endttyent
@@ -545,26 +438,22 @@ _execle
_execlp
_execv
_execvP
-_execve
_execvp
_exit
_f_prealloc
-_fchdir
_fchmodx_np
_fclose
-_fcntl$NOCANCEL
_fcvt
_fdopen
_fdopen$DARWIN_EXTSN
-_fegetenv
+_fdopendir
+_fdopendir$INODE64
_feof
_feof_unlocked
_ferror
_ferror_unlocked
-_fesetenv
_fflagstostr
_fflush
-_ffsctl
_fgetc
_fgetln
_fgetpos
@@ -586,7 +475,6 @@ _filesec_query_property
_filesec_set_property
_filesec_unset_property
_flockfile
-_flsl
_fmtcheck
_fmtmsg
_fnmatch
@@ -606,33 +494,24 @@ _fputwc_l
_fputws
_fputws_l
_fread
-_free
_free_printf_comp
_free_printf_domain
-_freeifaddrs
_freelocale
_freopen
_fscanf
_fscanf_l
-_fsctl
_fseek
_fseeko
_fsetpos
-_fstat
-_fstat$INODE64
-_fstatfs
-_fstatfs$INODE64
_fstatvfs
_fstatx64_np
_fstatx_np
_fstatx_np$INODE64
-_fsync$NOCANCEL
_fsync_volume_np
_ftell
_ftello
_ftime
_ftok
-_ftruncate
_ftrylockfile
_fts_children
_fts_children$INODE64
@@ -660,7 +539,6 @@ _fwscanf_l
_fxprintf
_fxprintf_exec
_gcvt
-_getattrlist
_getbsize
_getc
_getc_unlocked
@@ -670,22 +548,11 @@ _getcwd
_getdate
_getdate_err
_getdelim
-_getdirentries
_getdiskbyname
-_getdtablesize
_getenv
-_geteuid
-_getfsstat
-_getfsstat$INODE64
-_getfsstat64
-_getgrgid
-_getgrnam
-_getgroupcount
-_getgrouplist
_getgroups$DARWIN_EXTSN
_gethostid
_gethostname
-_getifaddrs
_getipv4sourcefilter
_getlastlogx
_getlastlogxbyname
@@ -703,24 +570,13 @@ _getopt_long_only
_getpagesize
_getpass
_getpeereid
-_getpgrp
-_getpid
-_getpriority
_getprogname
-_getpwnam
-_getpwuid
-_getpwuid_r
-_getrlimit
-_getrusage
_gets
-_getsectiondata
-_getsockopt
_getsourcefilter
_getsubopt
_gettimeofday
_getttyent
_getttynam
-_getuid
_getusershell
_getutmp
_getutmpx
@@ -753,9 +609,7 @@ _hcreate
_hdestroy
_heapsort
_heapsort_b
-_host_get_clock_service
_hsearch
-_if_nametoindex
_imaxabs
_imaxdiv
_index
@@ -777,7 +631,6 @@ _inet_ntop6
_inet_pton
_initstate
_insque
-_ioctl
_isalnum
_isalnum_l
_isalpha
@@ -808,7 +661,6 @@ _ispunct
_ispunct_l
_isrune
_isrune_l
-_issetugid
_isspace
_isspace_l
_isspecial
@@ -857,7 +709,7 @@ _iswxdigit_l
_isxdigit
_isxdigit_l
_jrand48
-_kill
+_kOSThermalNotificationPressureLevelName
_killpg
_l64a
_labs
@@ -882,26 +734,13 @@ _logout
_logwtmp
_lrand48
_lsearch
-_lseek
-_lstat
-_lstat$INODE64
_lstatx64_np
_lstatx_np
_lstatx_np$INODE64
_lutimes
-_mach_absolute_time
-_mach_error_string
-_mach_host_self
-_mach_port_deallocate
-_mach_task_self_
-_mach_timebase_info
-_malloc
_mblen
_mblen_l
_mbmb
-_mbr_gid_to_uuid
-_mbr_uid_to_uuid
-_mbr_uuid_to_id
_mbrlen
_mbrlen_l
_mbrrune
@@ -931,7 +770,6 @@ _memset_pattern8
_memset_s
_mergesort
_mergesort_b
-_mkdir
_mkdirx_np
_mkdtemp
_mkfifox_np
@@ -940,7 +778,6 @@ _mkstemp
_mkstemps
_mktemp
_mktime
-_mmap
_monaddition
_moncontrol
_moncount
@@ -957,10 +794,6 @@ _mpool_open
_mpool_put
_mpool_sync
_mrand48
-_munmap
-_nan
-_nanf
-_nanl
_nanosleep
_nanosleep$NOCANCEL
_new_printf_comp
@@ -973,16 +806,10 @@ _nftw$INODE64
_nice
_nl_langinfo
_nl_langinfo_l
-_notify_cancel
-_notify_check
-_notify_monitor_file
-_notify_post
-_notify_register_check
_nrand48
_off32
_off64
_offtime
-_open$NOCANCEL
_opendev
_opendir
_opendir$INODE64
@@ -993,60 +820,21 @@ _opterr
_optind
_optopt
_optreset
-_pathconf
_pause
_pause$NOCANCEL
_pclose
_perror
-_pipe
_popen
_popen$DARWIN_EXTSN
_posix2time
_posix_openpt
-_posix_spawn
-_posix_spawn_file_actions_addclose
-_posix_spawn_file_actions_adddup2
-_posix_spawn_file_actions_destroy
-_posix_spawn_file_actions_init
-_posix_spawnattr_destroy
-_posix_spawnattr_init
-_posix_spawnattr_setflags
-_posix_spawnattr_setsigdefault
-_posix_spawnattr_setsigmask
_posix_spawnp
-_pread$NOCANCEL
_printf
_printf_l
-_proc_name
-_pselect
-_pselect$1050
-_pselect$DARWIN_EXTSN
-_pselect$DARWIN_EXTSN$NOCANCEL
-_pselect$NOCANCEL
_psignal
_psort
_psort_b
_psort_r
-_pthread_get_stackaddr_np
-_pthread_get_stacksize_np
-_pthread_getspecific
-_pthread_key_create
-_pthread_key_init_np
-_pthread_kill
-_pthread_mutex_destroy
-_pthread_mutex_init
-_pthread_mutex_lock
-_pthread_mutex_trylock
-_pthread_mutex_unlock
-_pthread_once
-_pthread_rwlock_destroy
-_pthread_rwlock_rdlock
-_pthread_rwlock_unlock
-_pthread_rwlock_wrlock
-_pthread_self
-_pthread_setspecific
-_pthread_sigmask
-_pthread_testcancel
_ptsname
_putc
_putc_unlocked
@@ -1060,7 +848,6 @@ _putwc
_putwc_l
_putwchar
_putwchar_l
-_pwrite$NOCANCEL
_qsort
_qsort_b
_qsort_r
@@ -1078,14 +865,11 @@ _rb_tree_init
_rb_tree_insert_node
_rb_tree_iterate
_rb_tree_remove_node
-_read$NOCANCEL
_readdir
_readdir$INODE64
_readdir_r
_readdir_r$INODE64
-_readlink
_readpassphrase
-_realloc
_reallocf
_realpath
_realpath$DARWIN_EXTSN
@@ -1113,7 +897,6 @@ _rewind
_rewinddir
_rewinddir$INODE64
_rindex
-_rmdir
_sbrk
_scandir
_scandir$INODE64
@@ -1124,15 +907,8 @@ _scanf_l
_seed48
_seekdir
_seekdir$INODE64
-_select
-_select$1050
-_select$DARWIN_EXTSN
-_select$DARWIN_EXTSN$NOCANCEL
-_select$NOCANCEL
-_semaphore_create
_send
_send$NOCANCEL
-_setattrlist
_setbuf
_setbuffer
_setenv
@@ -1140,24 +916,16 @@ _sethostid
_sethostname
_setinvalidrune
_setipv4sourcefilter
-_setitimer
_setkey
_setlinebuf
_setlocale
_setlogin
_setmode
-_setpgid
_setpgrp
-_setpriority
_setprogname
-_setregid
-_setreuid
_setrgid
-_setrlimit
_setruid
_setrunelocale
-_setsid
-_setsockopt
_setsourcefilter
_setstate
_settimeofday
@@ -1180,12 +948,9 @@ _sigismember
_signal
_sigpause
_sigpause$NOCANCEL
-_sigprocmask
_sigrelse
_sigset
_sigsetmask
-_sigsuspend
-_sigsuspend$NOCANCEL
_sigvec
_skip
_sl_add
@@ -1197,10 +962,6 @@ _sleep$NOCANCEL
_snprintf
_snprintf_l
_sockatmark
-_socket
-_socketpair
-_spin_lock
-_spin_unlock
_sprintf
_sprintf_l
_sradixsort
@@ -1211,9 +972,6 @@ _srandom
_srandomdev
_sscanf
_sscanf_l
-_stat
-_stat$INODE64
-_statfs$INODE64
_statvfs
_statx64_np
_statx_np
@@ -1306,10 +1064,8 @@ _sysconf
_sysctl
_sysctlbyname
_sysctlnametomib
-_syslog
_system
_system$NOCANCEL
-_task_set_special_port
_tcdrain
_tcdrain$NOCANCEL
_tcflow
@@ -1346,6 +1102,23 @@ _towlower
_towlower_l
_towupper
_towupper_l
+_tre_ast_new_catenation
+_tre_ast_new_iter
+_tre_ast_new_literal
+_tre_ast_new_node
+_tre_ast_new_union
+_tre_compile
+_tre_fill_pmatch
+_tre_free
+_tre_mem_alloc_impl
+_tre_mem_destroy
+_tre_mem_new_impl
+_tre_parse
+_tre_stack_destroy
+_tre_stack_new
+_tre_stack_num_objects
+_tre_tnfa_run_backtrack
+_tre_tnfa_run_parallel
_tsearch
_ttyname
_ttyname_r
@@ -1356,13 +1129,11 @@ _tzset
_tzsetwall
_ualarm
_ulimit
-_umask
_umaskx_np
_uname
_ungetc
_ungetwc
_ungetwc_l
-_unlink
_unlockpt
_unsetenv
_unvis
@@ -1370,7 +1141,6 @@ _uselocale
_usleep
_usleep$NOCANCEL
_utime
-_utimes
_utmpxname
_uuid_clear
_uuid_compare
@@ -1407,7 +1177,6 @@ _vfwscanf_l
_vfxprintf
_vfxprintf_exec
_vis
-_vm_allocate
_vprintf
_vprintf_l
_vscanf
@@ -1436,7 +1205,6 @@ _vxprintf_exec
_wait
_wait$NOCANCEL
_wait3
-_wait4
_waitpid
_waitpid$NOCANCEL
_warn
@@ -1519,12 +1287,9 @@ _wordexp
_wordfree
_wprintf
_wprintf_l
-_write$NOCANCEL
-_writev$NOCANCEL
_wscanf
_wscanf_l
_wtmpxname
_xprintf
_xprintf_exec
-dyld_stub_binder
mcount
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols
index 9d53dea70253..ff9073157a58 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols
@@ -9,17 +9,20 @@ ___access_extended
___aio_suspend_nocancel
___bind
___bsdthread_create
+___bsdthread_ctl
___bsdthread_register
___bsdthread_terminate
___carbon_delete
___chmod
___chmod_extended
-___chud
___close_nocancel
+___coalition
+___coalition_info
___commpage_gettimeofday
___connect
___connect_nocancel
___copyfile
+___csrctl
___delete
___disable_threadsignal
___error
@@ -29,7 +32,6 @@ ___fchmod_extended
___fcntl
___fcntl_nocancel
___fork
-___fsgetpath
___fstat64_extended
___fstat_extended
___fsync_nocancel
@@ -37,7 +39,6 @@ ___get_remove_counter
___getattrlist
___getdirentries64
___gethostuuid
-___getlcid
___getlogin
___getpeername
___getpid
@@ -47,6 +48,7 @@ ___getsockname
___gettid
___gettimeofday
___getwgroups
+___guarded_open_dprotected_np
___guarded_open_np
___identitysvc
___inc_remove_counter
@@ -54,11 +56,13 @@ ___initgroups
___ioctl
___iopolicysys
___kdebug_trace
+___kdebug_trace64
___kernelVersionNumber
___kernelVersionString
___kill
___lchown
___libkernel_init
+___libkernel_voucher_init
___listen
___lseek
___lstat64_extended
@@ -66,8 +70,6 @@ ___lstat_extended
___mac_execve
___mac_get_fd
___mac_get_file
-___mac_get_lcid
-___mac_get_lctx
___mac_get_link
___mac_get_mount
___mac_get_pid
@@ -76,7 +78,6 @@ ___mac_getfsstat
___mac_mount
___mac_set_fd
___mac_set_file
-___mac_set_lctx
___mac_set_link
___mac_set_proc
___mac_syscall
@@ -96,6 +97,8 @@ ___open
___open_dprotected_np
___open_extended
___open_nocancel
+___openat
+___openat_nocancel
___pipe
___poll_nocancel
___posix_spawn
@@ -131,6 +134,7 @@ ___recvfrom_nocancel
___recvmsg
___recvmsg_nocancel
___rename
+___renameat
___rmdir
___sandbox_me
___sandbox_mm
@@ -149,8 +153,8 @@ ___sendmsg_nocancel
___sendto
___sendto_nocancel
___setattrlist
-___setlcid
___setlogin
+___setpriority
___setregid
___setreuid
___setrlimit
@@ -159,6 +163,8 @@ ___settid
___settid_with_pid
___settimeofday
___setwgroups
+___sfi_ctl
+___sfi_pidctl
___shared_region_check_np
___shared_region_map_and_slide_np
___shm_open
@@ -171,16 +177,18 @@ ___sigsuspend
___sigsuspend_nocancel
___sigwait
___socketpair
-___stack_snapshot
___stat64_extended
___stat_extended
___syscall
___syscall_logger
___sysctl
+___sysctlbyname
___telemetry
___thread_selfid
+___thread_selfusage
___umask_extended
___unlink
+___unlinkat
___vfork
___wait4
___wait4_nocancel
@@ -238,6 +246,7 @@ __kernelrpc_mach_port_set_attributes
__kernelrpc_mach_port_set_context
__kernelrpc_mach_port_set_mscount
__kernelrpc_mach_port_set_seqno
+__kernelrpc_mach_port_space_basic_info
__kernelrpc_mach_port_space_info
__kernelrpc_mach_port_type
__kernelrpc_mach_port_unguard
@@ -253,6 +262,9 @@ __kernelrpc_mach_vm_protect_trap
__kernelrpc_mach_vm_read
__kernelrpc_mach_vm_remap
__kernelrpc_task_set_port_space
+__kernelrpc_thread_policy
+__kernelrpc_thread_policy_set
+__kernelrpc_thread_set_policy
__kernelrpc_vm_map
__kernelrpc_vm_read
__kernelrpc_vm_remap
@@ -304,11 +316,18 @@ _clock_sleep
_clock_sleep_trap
_close
_close$NOCANCEL
+_coalition_create
+_coalition_info_resource_usage
+_coalition_reap
+_coalition_terminate
_connect
_connect$NOCANCEL
_connectx
_csops
_csops_audittoken
+_csr_check
+_csr_get_active_config
+_denap_boost_assertion_token
_disconnectx
_dup
_dup2
@@ -321,10 +340,13 @@ _exception_raise_state
_exception_raise_state_identity
_exchangedata
_execve
+_faccessat
_fchdir
_fchflags
_fchmod
+_fchmodat
_fchown
+_fchownat
_fcntl
_fcntl$NOCANCEL
_fdatasync
@@ -344,6 +366,9 @@ _fsetxattr
_fstat
_fstat$INODE64
_fstat64
+_fstatat
+_fstatat$INODE64
+_fstatat64
_fstatfs
_fstatfs$INODE64
_fstatfs64
@@ -353,6 +378,8 @@ _ftruncate
_futimes
_get_dp_control_port
_getattrlist
+_getattrlistat
+_getattrlistbulk
_getaudit
_getaudit_addr
_getauid
@@ -387,7 +414,12 @@ _getwgroups_np
_getxattr
_guarded_close_np
_guarded_kqueue_np
+_guarded_open_dprotected_np
_guarded_open_np
+_guarded_pwrite_np
+_guarded_write_np
+_guarded_writev_np
+_host_create_mach_voucher
_host_default_memory_manager
_host_get_UNDServer
_host_get_boot_info
@@ -406,6 +438,8 @@ _host_processor_set_priv
_host_processor_sets
_host_processors
_host_reboot
+_host_register_mach_voucher_attr_manager
+_host_register_well_known_mach_voucher_attr_manager
_host_request_notification
_host_security_create_task_token
_host_security_set_task_token
@@ -426,6 +460,7 @@ _internal_catch_exc_subsystem
_ioctl
_issetugid
_kas_info
+_kdebug_trace
_kevent
_kevent64
_kext_request
@@ -438,6 +473,7 @@ _kqueue
_lchown
_ledger
_link
+_linkat
_lio_listio
_listen
_listxattr
@@ -454,6 +490,7 @@ _lstat
_lstat$INODE64
_lstat64
_mach_absolute_time
+_mach_approximate_time
_mach_error
_mach_error_full_diag
_mach_error_string
@@ -510,6 +547,7 @@ _mach_port_set_attributes
_mach_port_set_context
_mach_port_set_mscount
_mach_port_set_seqno
+_mach_port_space_basic_info
_mach_port_space_info
_mach_port_type
_mach_port_unguard
@@ -540,6 +578,12 @@ _mach_vm_region_recurse
_mach_vm_remap
_mach_vm_wire
_mach_vm_write
+_mach_voucher_attr_command
+_mach_voucher_deallocate
+_mach_voucher_debug_info
+_mach_voucher_extract_all_attr_recipes
+_mach_voucher_extract_attr_content
+_mach_voucher_extract_attr_recipe
_mach_wait_until
_mach_zone_force_gc
_mach_zone_info
@@ -565,6 +609,7 @@ _mk_timer_cancel
_mk_timer_create
_mk_timer_destroy
_mkdir
+_mkdirat
_mkfifo
_mknod
_mlock
@@ -573,6 +618,7 @@ _mmap
_modwatch
_mount
_mprotect
+_mremap_encrypted
_msg_receive
_msg_rpc
_msg_send
@@ -588,6 +634,7 @@ _msync$NOCANCEL
_munlock
_munlockall
_munmap
+_necp_match_policy
_netname_check_in
_netname_check_out
_netname_look_up
@@ -599,12 +646,17 @@ _normal_boost_assertion_token
_open
_open$NOCANCEL
_open_dprotected_np
+_openat
+_openat$NOCANCEL
+_openbyid_np
_panic
_panic_init
_pathconf
_peeloff
_pid_for_task
+_pid_hibernate
_pid_resume
+_pid_shutdown_sockets
_pid_suspend
_pipe
_poll
@@ -621,6 +673,7 @@ _posix_spawn_file_actions_addopen
_posix_spawn_file_actions_destroy
_posix_spawn_file_actions_init
_posix_spawnattr_destroy
+_posix_spawnattr_get_qos_clamp_np
_posix_spawnattr_getbinpref_np
_posix_spawnattr_getcpumonitor
_posix_spawnattr_getflags
@@ -632,8 +685,10 @@ _posix_spawnattr_getsigdefault
_posix_spawnattr_getsigmask
_posix_spawnattr_init
_posix_spawnattr_set_importancewatch_port_np
+_posix_spawnattr_set_qos_clamp_np
_posix_spawnattr_setauditsessionport_np
_posix_spawnattr_setbinpref_np
+_posix_spawnattr_setcoalition_np
_posix_spawnattr_setcpumonitor
_posix_spawnattr_setcpumonitor_default
_posix_spawnattr_setexceptionports_np
@@ -648,7 +703,10 @@ _posix_spawnattr_setspecialport_np
_pread
_pread$NOCANCEL
_proc_clear_delayidlesleep
+_proc_clear_dirty
_proc_clear_vmpressure
+_proc_denap_assertion_begin_with_msg
+_proc_denap_assertion_complete
_proc_disable_apptype
_proc_disable_cpumon
_proc_disable_wakemon
@@ -671,19 +729,23 @@ _proc_pid_rusage
_proc_pidfdinfo
_proc_pidfileportinfo
_proc_pidinfo
+_proc_pidoriginatorinfo
_proc_pidpath
_proc_regionfilename
_proc_rlimit_control
_proc_set_cpumon_defaults
_proc_set_cpumon_params
+_proc_set_cpumon_params_fatal
_proc_set_delayidlesleep
_proc_set_dirty
_proc_set_owner_vmpressure
_proc_set_wakemon_defaults
_proc_set_wakemon_params
_proc_setpcontrol
+_proc_setthread_cpupercent
_proc_suppress
_proc_terminate
+_proc_trace_log
_proc_track_dirty
_proc_uuid_policy
_processor_assign
@@ -704,6 +766,11 @@ _processor_set_statistics
_processor_set_tasks
_processor_set_threads
_processor_start
+_pselect
+_pselect$1050
+_pselect$DARWIN_EXTSN
+_pselect$DARWIN_EXTSN$NOCANCEL
+_pselect$NOCANCEL
_pthread_getugid_np
_pthread_setugid_np
_ptrace
@@ -714,6 +781,7 @@ _quotactl
_read
_read$NOCANCEL
_readlink
+_readlinkat
_readv
_readv$NOCANCEL
_reboot
@@ -721,8 +789,11 @@ _recvfrom
_recvfrom$NOCANCEL
_recvmsg
_recvmsg$NOCANCEL
+_recvmsg_x
_removexattr
_rename
+_rename_ext
+_renameat
_revoke
_rmdir
_searchfs
@@ -764,6 +835,7 @@ _semsys
_sendfile
_sendmsg
_sendmsg$NOCANCEL
+_sendmsg_x
_sendto
_sendto$NOCANCEL
_set_dp_control_port
@@ -790,6 +862,10 @@ _setsockopt
_setuid
_setwgroups_np
_setxattr
+_sfi_get_class_offtime
+_sfi_process_get_flags
+_sfi_process_set_flags
+_sfi_set_class_offtime
_shm_open
_shm_unlink
_shmat
@@ -815,10 +891,13 @@ _swapon
_swtch
_swtch_pri
_symlink
+_symlinkat
_sync
_syscall
_syscall_thread_switch
+_system_get_sfi_window
_system_override
+_system_set_sfi_window
_task_assign
_task_assign_default
_task_create
@@ -826,6 +905,7 @@ _task_for_pid
_task_get_assignment
_task_get_emulation_vector
_task_get_exception_ports
+_task_get_mach_voucher
_task_get_special_port
_task_get_state
_task_info
@@ -843,6 +923,7 @@ _task_set_emulation
_task_set_emulation_vector
_task_set_exception_ports
_task_set_info
+_task_set_mach_voucher
_task_set_phys_footprint_limit
_task_set_policy
_task_set_port_space
@@ -852,6 +933,7 @@ _task_set_state
_task_suspend
_task_suspend2
_task_swap_exception_ports
+_task_swap_mach_voucher
_task_terminate
_task_threads
_task_zone_info
@@ -864,6 +946,7 @@ _thread_create_running
_thread_depress_abort
_thread_get_assignment
_thread_get_exception_ports
+_thread_get_mach_voucher
_thread_get_special_port
_thread_get_state
_thread_info
@@ -874,11 +957,13 @@ _thread_resume
_thread_sample
_thread_self_trap
_thread_set_exception_ports
+_thread_set_mach_voucher
_thread_set_policy
_thread_set_special_port
_thread_set_state
_thread_suspend
_thread_swap_exception_ports
+_thread_swap_mach_voucher
_thread_switch
_thread_terminate
_thread_wire
@@ -886,6 +971,7 @@ _truncate
_umask
_undelete
_unlink
+_unlinkat
_unmount
_utimes
_vfork
@@ -917,6 +1003,10 @@ _vm_region_recurse_64
_vm_remap
_vm_wire
_vm_write
+_voucher_mach_msg_adopt
+_voucher_mach_msg_clear
+_voucher_mach_msg_revert
+_voucher_mach_msg_set
_vprintf_stderr_func
_wait4
_waitevent
diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix
index d7710abf291b..8625ac72c104 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix
@@ -10,37 +10,37 @@ let
dtrace = "168";
xnu = "3248.60.10";
libpthread = "138.10.4";
+ libiconv = "44";
+ Libnotify = "150.40.1";
+ objc4 = "680";
+ eap8021x = "222.40.1";
+ dyld = "360.22";
+ architecture = "268";
+ CommonCrypto = "60075.50.1";
+ copyfile = "127";
+ Csu = "85";
+ ppp = "809.50.2";
+ libclosure = "65";
+ Libinfo = "477.50.4";
+ Libsystem = "1226.10.1";
+ removefile = "41";
+ libresolv = "60";
+
+ # Their release page is a bit of a mess here, so I'm going to lie a bit and say this version
+ # is the right one, even though it isn't. The version I have here doesn't appear to be linked
+ # to any OS releases, but Apple also doesn't mention mDNSResponder from 10.11 to 10.11.6, and
+ # neither of those versions are publicly available.
+ mDNSResponder = "625.41.2";
+
+ libutil = "43";
+ libunwind = "35.3";
};
"osx-10.11.5" = {
Libc = "1082.50.1"; # 10.11.6 still unreleased :/
};
"osx-10.10.5" = {
adv_cmds = "158";
- architecture = "266";
- CF = "1153.18";
- CommonCrypto = "60061.30.1";
- copyfile = "118.1.2";
- Csu = "85";
- dyld = "353.2.3";
- eap8021x = "198.30.1";
- libauto = "186";
- Libc = "1044.40.1";
- libclosure = "65";
- libdispatch = "442.1.4";
- libiconv = "42";
- Libinfo = "459.40.1";
- Libnotify = "133.1.1";
- libpthread = "105.40.1";
- libresolv = "57";
- Libsystem = "1213";
- libunwind = "35.3";
- libutil = "38";
- mDNSResponder = "576.30.4";
- objc4 = "647";
- ppp = "786.40.2";
- removefile = "35";
Security = "57031.40.6";
- xnu = "2782.40.9";
IOAudioFamily = "203.3";
IOFireWireFamily = "458";
@@ -62,15 +62,11 @@ let
CF = "855.17";
launchd = "842.92.1";
libauto = "185.5";
- Libc = "997.90.3";
+ Libc = "997.90.3"; # We use this, but not from here
libdispatch = "339.92.1";
- libiconv = "41";
- Libnotify = "121.20.1";
Libsystem = "1197.1.1";
- objc4 = "551.1";
Security = "55471.14.18";
security_dotmac_tp = "55107.1";
- xnu = "2422.115.4";
IOStorageFamily = "172";
};
@@ -178,21 +174,20 @@ let
packages = {
inherit (adv_cmds) ps locale;
- architecture = applePackage "architecture" "osx-10.10.5" "0fc9s1f4mnzaixrmkkq9y8276g8i5grryh2dggi4h347i33kd097" {};
+ architecture = applePackage "architecture" "osx-10.11.6" "1pbpjcd7is69hn8y29i98ci0byik826if8gnp824ha92h90w0fq3" {};
bootstrap_cmds = applePackage "bootstrap_cmds" "dev-tools-7.0" "1v5dv2q3af1xwj5kz0a5g54fd5dm6j4c9dd2g66n4kc44ixyrhp3" {};
bsdmake = applePackage "bsdmake" "dev-tools-3.2.6" "11a9kkhz5bfgi1i8kpdkis78lhc6b5vxmhd598fcdgra1jw4iac2" {};
CarbonHeaders = applePackage "CarbonHeaders" "osx-10.6.2" "1zam29847cxr6y9rnl76zqmkbac53nx0szmqm9w5p469a6wzjqar" {};
CF = applePackage "CF" "osx-10.9.5" "1sadmxi9fsvsmdyxvg2133sdzvkzwil5fvyyidxsyk1iyfzqsvln" {};
- CommonCrypto = applePackage "CommonCrypto" "osx-10.10.5" "0rm1r552i3mhyik2y3309dw90ap6vlhk583237jxfmdkip4c6mdr" {};
+ CommonCrypto = applePackage "CommonCrypto" "osx-10.11.6" "0vllfpb8f4f97wj2vpdd7w5k9ibnsbr6ff1zslpp6q323h01n25y" {};
configd = applePackage "configd" "osx-10.8.5" "1gxakahk8gallf16xmhxhprdxkh3prrmzxnmxfvj0slr0939mmr2" {};
- copyfile = applePackage "copyfile" "osx-10.10.5" "1s90wv9jsi6ismdnc1my3rxaa83k3s5ialrs5xlrmyb7s0pgvz7j" {};
+ copyfile = applePackage "copyfile" "osx-10.11.6" "1rkf3iaxmjz5ycgrmf0g971kh90jb2z1zqxg5vlqz001s4y457gs" {};
CoreOSMakefiles = applePackage "CoreOSMakefiles" "osx-10.5" "0kxp53spbn7109l7cvhi88pmfsi81lwmbws819b6wr3hm16v84f4" {};
- Csu = applePackage "Csu" "osx-10.10.5" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {};
- dtrace = applePackage "dtrace" "osx-10.10.5" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wcf" {};
- dtracen = applePackage "dtrace" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {};
- dyld = applePackage "dyld" "osx-10.10.5" "167f74ln8pmfimwn6kwh199ylvy3fw72fd15da94mf34ii0zar6k" {};
- eap8021x = applePackage "eap8021x" "osx-10.10.5" "1f37dpbcgrd1b14nrv2lpqrkap74myjbparz9masx92df6kcn7l2" {};
- IOKit = applePackage "IOKit" "osx-10.10.5" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x0m" { inherit IOKitSrcs; };
+ Csu = applePackage "Csu" "osx-10.11.6" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {};
+ dtrace = applePackage "dtrace" "osx-10.11.6" "0pp5x8dgvzmg9vvg32hpy2brm17dpmbwrcr4prsmdmfvd4767wc0" {};
+ dyld = applePackage "dyld" "osx-10.11.6" "0qkjmjazm2zpgvwqizhandybr9cm3gz9pckx8rmf0py03faafc08" {};
+ eap8021x = applePackage "eap8021x" "osx-10.11.6" "15bbgjhi8l7hbib41gqcldzbf3hf6105jbwc745hp1gmrscw4zch" {};
+ IOKit = applePackage "IOKit" "osx-10.11.6" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x00" { inherit IOKitSrcs; };
launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {};
libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {};
Libc = applePackage "Libc" "osx-10.11.5" "1qv7r0dgz06jy9i5agbqzxgdibb0m8ylki6g5n5pary88lzrawfd" {
@@ -202,35 +197,24 @@ let
};
};
Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {};
- libclosure = applePackage "libclosure" "osx-10.10.5" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {};
+ libclosure = applePackage "libclosure" "osx-10.11.6" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {};
libdispatch = applePackage "libdispatch" "osx-10.9.5" "1lc5033cmkwxy3r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {};
- libiconv = applePackage "libiconv" "osx-10.9.5" "0sni1gx6i2h7r4r4hhwbxdir45cp039m4wi74izh4l0pfw7gywad" {};
- Libinfo = applePackage "Libinfo" "osx-10.10.5" "19n72s652rrqnc9hzlh4xq3h7xsfyjyklmcgyzyj0v0z68ww3z6h" {};
+ libiconv = applePackage "libiconv" "osx-10.11.6" "11h6lfajydri4widis62q8scyz7z8l6msqyx40ly4ahsdlbl0981" {};
+ Libinfo = applePackage "Libinfo" "osx-10.11.6" "0qjgkd4y8sjvwjzv5wwyzkb61pg8wwg95bkp721dgzv119dqhr8x" {};
Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {};
- Libnotify = applePackage "Libnotify" "osx-10.9.5" "164rx4za5z74s0mk9x0m1815r1m9kfal8dz3bfaw7figyjd6nqad" {};
+ Libnotify = applePackage "Libnotify" "osx-10.11.6" "14rhhfzb75r9jf3kyj8fzd01n09n7km1fsdj3dzl3lkkp1sir78m" {};
libpthread = applePackage "libpthread" "osx-10.11.6" "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {};
- libresolv = applePackage "libresolv" "osx-10.10.5" "0nvssf4qaqgs1dxwayzdy66757k99969f6c7n68n58n2yh6f5f6a" {};
- Libsystem = applePackage "Libsystem" "osx-10.9.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim1gw43x4lvz4qydpp5kg2rh" {};
- libutil = applePackage "libutil" "osx-10.10.5" "12gsvmj342n5d81kqwba68bmz3zf2757442g1sz2y5xmcapa3g5f" {};
- libunwind = applePackage "libunwind" "osx-10.10.5" "0miffaa41cv0lzf8az5k1j1ng8jvqvxcr4qrlkf3xyj479arbk1b" {};
- mDNSResponder = applePackage "mDNSResponder" "osx-10.10.5" "1h4jin7ya1ih7v0hksi7gfmbv767pv8wsyyv1qfy2xw36x8wnds7" {};
- objc4 = applePackage "objc4" "osx-10.9.5" "1jrdb6yyb5jwwj27c1r0nr2y2ihqjln8ynj61mpkvp144c1cm5bg" {};
- ppp = applePackage "ppp" "osx-10.10.5" "01v7i0xds185glv8psvlffylfcfhbx1wgsfg74kx5rh3lyrigwrb" {};
- removefile = applePackage "removefile" "osx-10.10.5" "1f2jw5irq6fz2jv5pag1w2ivfp8659v74f0h8kh0yx0rqw4asm33" {};
+ libresolv = applePackage "libresolv" "osx-10.11.6" "09flfdi3dlzq0yap32sxidacpc4nn4va7z12a6viip21ix2xb2gf" {};
+ Libsystem = applePackage "Libsystem" "osx-10.11.6" "1nfkmbqml587v2s1d1y2s2v8nmr577jvk51y6vqrfvsrhdhc2w94" {};
+ libutil = applePackage "libutil" "osx-10.11.6" "1gmgmcyqdyc684ih7dimdmxdljnq7mzjy5iqbf589wc0pa8h5abm" {};
+ libunwind = applePackage "libunwind" "osx-10.11.6" "16nhx2pahh9d62mvszc88q226q5lwjankij276fxwrm8wb50zzlx" {};
+ mDNSResponder = applePackage "mDNSResponder" "osx-10.11.6" "069incq28a78yh1bnr17h9cd5if5mwqpq8ahnkyxxx25fkaxgzcf" {};
+ objc4 = applePackage "objc4" "osx-10.11.6" "00b7vbgxni8frrqyi69b4njjihlwydzjd9zj9x4z5dbx8jabkvrj" {};
+ ppp = applePackage "ppp" "osx-10.11.6" "1dql6r1v0vbcs04958nn2i6p31yfsxyy51jca63bm5mf0gxalk3f" {};
+ removefile = applePackage "removefile" "osx-10.11.6" "1b6r74ry3k01kypvlaclf33fha15pcm0kzx9zrymlg66wg0s0i3r" {};
Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {};
xnu = applePackage "xnu" "osx-10.11.6" "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {};
- # Pending work... we can't change the above packages in place because the bootstrap depends on them, so we detach the expressions
- # here so we can work on them.
- CF_new = applePackage "CF/new.nix" "osx-10.10.5" "1sadmxi9fsvsmdyxvg2133sdzvkzwil50vyyidxsyk1iyfzqsvln" {};
- Libc_new = applePackage "Libc/new.nix" "osx-10.10.5" "1jz5bx9l4q484vn08c6n9b28psja3rpxiqbj6zwrwvlndzmq1yz5" {};
- libdispatch_new = applePackage "libdispatch/new.nix" "osx-10.10.5" "1lc5033cmkwxy0r26gh9plimxshxfcbgw6i0j7mgjlnpk86iy5bk" {};
- libiconv_new = applePackage "libiconv/new.nix" "osx-10.10.5" "0sni1gx6i2h7r404hhwbxdir45cp039m4wi74izh4l0pfw7gywad" {};
- Libnotify_new = applePackage "Libnotify/new.nix" "osx-10.10.5" "0sni1gx6i2h7r404hhwbxdir45cp039m4wi70izh4l0pfw7gywad" {};
- Libsystem_new = applePackage "Libsystem/new.nix" "osx-10.10.5" "1yfj2qdrf9vrzs7p9m4wlb7zzxcrim10w43x4lvz4qydpp5kg2rh" {};
- objc4_new = applePackage "objc4/new.nix" "osx-10.10.5" "0r0797ckmgv19if4i14dzyjh7i5klkm9jpacjif9v3rpycyyx1n3" {};
- xnu_new = applePackage "xnu/new.nix" "osx-10.11.2" "1ax280jblz7laqam8fcwrffrrz26am10p1va9mlg9mklvbqarhqh" {};
-
libsecurity_apple_csp = libsecPackage "libsecurity_apple_csp" "osx-10.7.5" "1ngyn1ik27n4x981px3kfd1z1n8zx7r5w812b6qfjpy5nw4h746w" {};
libsecurity_apple_cspdl = libsecPackage "libsecurity_apple_cspdl" "osx-10.7.5" "1svqa5fhw7p7njzf8bzg7zgc5776aqjhdbnlhpwmr5hmz5i0x8r7" {};
libsecurity_apple_file_dl = libsecPackage "libsecurity_apple_file_dl" "osx-10.7.5" "1dfqani3n135i3iqmafc1k9awmz6s0a78zifhk15rx5a8ps870bl" {};
diff --git a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
index 5b82835d3e64..f5feee48e071 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/libiconv/default.nix
@@ -7,9 +7,10 @@ appleDerivation {
mv $out/lib/libiconv.dylib $out/lib/libiconv-nocharset.dylib
install_name_tool -id $out/lib/libiconv-nocharset.dylib $out/lib/libiconv-nocharset.dylib
- ld -dylib -o $out/lib/libiconv.dylib \
- -reexport_library $out/lib/libiconv-nocharset.dylib \
- -reexport_library $out/lib/libcharset.dylib \
- -dylib_compatibility_version 7.0.0
+ # re-export one useless symbol; ld will reject a dylib that only reexports other dylibs
+ echo 'void dont_use_this(){}' | clang -dynamiclib -x c - -current_version 2.4.0 \
+ -compatibility_version 7.0.0 -current_version 7.0.0 -o $out/lib/libiconv.dylib \
+ -Wl,-reexport_library -Wl,$out/lib/libiconv-nocharset.dylib \
+ -Wl,-reexport_library -Wl,$out/lib/libcharset.dylib
'';
}
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index bc6492f243fa..2f13277d70c7 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -6,13 +6,13 @@
let
baseParams = rec {
name = "cctools-port-${version}";
- version = "877.5";
+ version = "886";
src = fetchFromGitHub {
owner = "tpoechtrager";
repo = "cctools-port";
- rev = "7d405492b09fa27546caaa989b8493829365deab";
- sha256 = "0nj1q5bqdx5jm68dispybxc7wnkb6p8p2igpnap9q6qyv2r9p07w";
+ rev = "02f0b8ecd87a3951653d838a321ae744815e21a5";
+ sha256 = "0bzyabzr5dvbxglr74d0kbrk2ij5x7s5qcamqi1v546q1had1wz1";
};
buildInputs = [ autoconf automake libtool_2 openssl libuuid ] ++
@@ -22,6 +22,9 @@ let
patches = [
./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch
+ ] ++ stdenv.lib.optionals stdenv.isDarwin [
+ # See https://github.com/tpoechtrager/cctools-port/issues/24. Remove when that's fixed.
+ ./undo-unknown-triple.patch
];
enableParallelBuilding = true;
diff --git a/pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch b/pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch
new file mode 100644
index 000000000000..7df9bdd16dab
--- /dev/null
+++ b/pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch
@@ -0,0 +1,17 @@
+diff --git a/cctools/as/driver.c b/cctools/as/driver.c
+index b06d085..c03397a 100644
+--- a/cctools/as/driver.c
++++ b/cctools/as/driver.c
+@@ -363,12 +363,6 @@ char **envp)
+ /* Add -c or clang will run ld(1). */
+ new_argv[j] = "-c";
+ j++;
+- /* cctools-port start */
+- new_argv[j] = "-target";
+- j++;
+- new_argv[j] = "unknown-apple-darwin";
+- j++;
+- /* cctools-port end */
+ new_argv[j] = NULL;
+ if(execute(new_argv, verbose))
+ exit(0);
diff --git a/pkgs/os-specific/darwin/usr-include/default.nix b/pkgs/os-specific/darwin/usr-include/default.nix
new file mode 100644
index 000000000000..c5f7e3acce7e
--- /dev/null
+++ b/pkgs/os-specific/darwin/usr-include/default.nix
@@ -0,0 +1,21 @@
+{stdenv, darwin}:
+
+/*
+ * This is needed to build GCC on Darwin.
+ *
+ * These are the collection of headers that would normally be available under
+ * /usr/include in OS X machines with command line tools installed. They need
+ * to be in one folder for gcc to use them correctly.
+ */
+
+stdenv.mkDerivation {
+ name = "darwin-usr-include";
+ buildInputs = [ darwin.CF stdenv.libc ];
+ buildCommand = ''
+ mkdir -p $out
+ cd $out
+ ln -sf ${stdenv.libc}/include/* .
+ mkdir CoreFoundation
+ ln -sf ${darwin.CF}/Library/Frameworks/CoreFoundation.framework/Headers/* CoreFoundation
+ '';
+}
diff --git a/pkgs/os-specific/linux/amdgpu-pro/default.nix b/pkgs/os-specific/linux/amdgpu-pro/default.nix
new file mode 100644
index 000000000000..17a066640410
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/default.nix
@@ -0,0 +1,155 @@
+{ stdenv, fetchurl, elfutils, mesa_noglu
+, xorg, patchelf, openssl, libdrm, libudev
+, libxcb, libxshmfence, epoxy, perl, zlib
+, libsOnly ? false, kernel ? null
+}:
+
+assert (!libsOnly) -> kernel != null;
+
+with stdenv.lib;
+
+let
+
+ kernelDir = if libsOnly then null else kernel.dev;
+
+ inherit (mesa_noglu) driverLink;
+
+ bitness = if stdenv.is64bit then "64" else "32";
+
+ libArch =
+ if stdenv.system == "i686-linux" then
+ "i386-linux-gnu"
+ else if stdenv.system == "x86_64-linux" then
+ "x86_64-linux-gnu"
+ else throw "amdgpu-pro is Linux only. Sorry. The build was stopped.";
+
+ libReplaceDir = "/usr/lib/${libArch}";
+
+in stdenv.mkDerivation rec {
+
+ version = "16.30";
+ pname = "amdgpu-pro";
+ build = "16.30.3-315407";
+
+ libCompatDir = "/run/lib/${libArch}";
+
+ name = pname + "-" + version + (optionalString (!libsOnly) "-${kernelDir.version}");
+
+ src = fetchurl {
+ url =
+ "https://www2.ati.com/drivers/linux/amdgpu-pro_${build}.tar.xz";
+ sha256 = "97d6fb64617cf2cefe780e5fb83b29d8ee4e3e7886b71fe3d92b0113847b2354";
+ curlOpts = "--referer http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Beta-Driver-for-Vulkan-Release-Notes.aspx";
+ };
+
+ hardeningDisable = [ "pic" "format" ];
+
+ inherit libsOnly;
+
+ postUnpack = ''
+ cd $sourceRoot
+ mkdir root
+ cd root
+ for deb in ../*.deb; do echo $deb; ar p $deb data.tar.xz | tar -xJ; done
+ sourceRoot=.
+ '';
+
+ modulePatches = [
+ ./patches/0001-add-OS-detection-for-arch.patch
+ ./patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
+ ./patches/0003-add-kcl_drm_gem_object_lookup.patch
+ ./patches/0004-paging-changes-for-linux-4.6.patch
+ ./patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
+ ./patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
+ ./patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
+ ./patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
+ ./patches/0009-disable-dal-by-default.patch
+ ./patches/0010-remove-dependency-on-System.map.patch
+ ];
+
+ patchPhase = optionalString (!libsOnly) ''
+ pushd usr/src/amdgpu-pro-${build}
+ for patch in $modulePatches; do echo $patch; patch -p1 < $patch; done
+ popd
+ '';
+
+ preBuild = optionalString (!libsOnly) ''
+ makeFlags="$makeFlags M=$(pwd)/usr/src/amdgpu-pro-${build}"
+ '';
+
+ postBuild = optionalString (!libsOnly) ''
+ xz usr/src/amdgpu-pro-${build}/amd/amdgpu/amdgpu.ko
+ '';
+
+ makeFlags = optionalString (!libsOnly)
+ "-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build modules";
+
+ depLibPath = makeLibraryPath [
+ stdenv.cc.cc.lib xorg.libXext xorg.libX11 xorg.libXdamage xorg.libXfixes zlib
+ xorg.libXxf86vm libxcb libxshmfence epoxy openssl libdrm elfutils libudev
+ ];
+
+ installPhase = ''
+ mkdir -p $out
+ cp -r usr/bin $out/bin
+ cp -r etc $out/etc
+ cp -r usr/include $out/include
+ cp -r usr/lib/${libArch} $out/lib
+ mv $out/lib/amdgpu-pro/* $out/lib/
+ rmdir $out/lib/amdgpu-pro
+ cp -r usr/share $out/share
+ '' + optionalString (!libsOnly) ''
+ if [ -d $out/lib/xorg ]; then
+ rm $out/lib/xorg
+ mv $out/lib/1.18 $out/lib/xorg
+ rm -r $out/lib/1.*
+ fi
+ cp -r lib/firmware $out/lib/firmware
+ mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.xz
+ cp usr/src/amdgpu-pro-${build}/amd/amdgpu/amdgpu.ko.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.xz
+ '' + ''
+ interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
+ libPath="$out/lib:$out/lib/gbm:$depLibPath"
+ echo patching with $interpreter $libPath
+ for prog in "$out"/bin/*; do
+ echo patching program $prog
+ patchelf --interpreter "$interpreter" --set-rpath "$libPath" "$prog"
+ done
+ for lib in `find "$out/lib/" -name '*.so*'`; do
+ echo patching library $lib
+ patchelf --set-rpath "$libPath" "$lib"
+ done
+ '';
+
+ postFixup = assert (stringLength libReplaceDir == stringLength libCompatDir); ''
+ libPath="$out/lib:$out/lib/gbm:$depLibPath"
+ for lib in libgbm.so.1.0.0 ${optionalString (!libsOnly) "xorg/modules/drivers/amdgpu_drv.so"} amdvlk${bitness}.so vdpau/libvdpau_amdgpu.so; do
+ if [ -e "$out/lib/$lib" ]; then
+ patchelf --set-rpath "$libPath" "$out/lib/$lib"
+ fi
+ done
+ for lib in libEGL.so.1 libGL.so.1.2 ${optionalString (!libsOnly) "xorg/modules/extensions/libglx.so"} dri/amdgpu_dri.so; do
+ if [ -e "$out/lib/$lib" ]; then
+ perl -pi -e 's:${libReplaceDir}:${libCompatDir}:g' "$out/lib/$lib"
+ fi
+ done
+ substituteInPlace "$out/etc/vulkan/icd.d/amd_icd${bitness}.json" --replace "/usr/lib/${libArch}" "$out/lib"
+ '';
+
+ buildInputs = [
+ patchelf
+ perl
+ ];
+
+ enableParallelBuilding = true;
+
+ meta = with stdenv.lib; {
+ description = "AMDGPU-PRO drivers";
+ homepage = http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Beta-Driver-for-Vulkan-Release-Notes.aspx ;
+ license = licenses.unfree;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ corngood ];
+ # Copied from the nvidia default.nix to prevent a store collision.
+ priority = 4;
+ };
+}
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch
new file mode 100644
index 000000000000..46302ae0ea89
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0001-add-OS-detection-for-arch.patch
@@ -0,0 +1,26 @@
+From e78ede724fff53fc0220999f6381242142ce8c33 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:30:25 -0300
+Subject: [PATCH 1/8] add OS detection for arch
+
+---
+ amd/backport/Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/amd/backport/Makefile b/amd/backport/Makefile
+index 0c285ef..6447a15 100644
+--- a/amd/backport/Makefile
++++ b/amd/backport/Makefile
+@@ -17,6 +17,9 @@ else ifeq ("ubuntu",$(OS_NAME))
+ ccflags-y += -DOS_NAME_UBUNTU
+ else ifeq ("steamos",$(OS_NAME))
+ ccflags-y += -DOS_NAME_STEAMOS
++else ifeq ("arch",$(OS_NAME))
++ccflags-y += -DOS_NAME_ARCH
++OS_VERSION = "0.0"
+ else
+ ccflags-y += -DOS_NAME_UNKNOWN
+ endif
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
new file mode 100644
index 000000000000..4101662a4ebe
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0002-update-kcl_ttm_bo_reserve-for-linux-4.7.patch
@@ -0,0 +1,25 @@
+From d84bd62a10308efb6a414e8f6582a7b1e9860638 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:31:12 -0300
+Subject: [PATCH 2/8] update kcl_ttm_bo_reserve for linux-4.7
+
+---
+ amd/backport/include/kcl/kcl_ttm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/amd/backport/include/kcl/kcl_ttm.h b/amd/backport/include/kcl/kcl_ttm.h
+index 3575004..0d1560d 100644
+--- a/amd/backport/include/kcl/kcl_ttm.h
++++ b/amd/backport/include/kcl/kcl_ttm.h
+@@ -84,7 +84,7 @@ static inline int kcl_ttm_bo_reserve(struct ttm_buffer_object *bo,
+ bool interruptible, bool no_wait,
+ struct ww_acquire_ctx *ticket)
+ {
+-#if defined(BUILD_AS_DKMS)
++#if defined(BUILD_AS_DKMS) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
+ return ttm_bo_reserve(bo, interruptible, no_wait, false, ticket);
+ #else
+ return ttm_bo_reserve(bo, interruptible, no_wait, ticket);
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch
new file mode 100644
index 000000000000..214b8effd9d3
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0003-add-kcl_drm_gem_object_lookup.patch
@@ -0,0 +1,204 @@
+From 2637dfe990e4c277bc724f6ba48e6661506805ec Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:37:34 -0300
+Subject: [PATCH 3/8] add kcl_drm_gem_object_lookup
+
+---
+ amd/amdgpu/amdgpu_atpx_handler.c | 4 ++++
+ amd/amdgpu/amdgpu_bo_list.c | 2 +-
+ amd/amdgpu/amdgpu_cs.c | 2 +-
+ amd/amdgpu/amdgpu_display.c | 2 +-
+ amd/amdgpu/amdgpu_gem.c | 10 +++++-----
+ amd/amdgpu/dce_v10_0.c | 2 +-
+ amd/amdgpu/dce_v11_0.c | 2 +-
+ amd/amdgpu/dce_v8_0.c | 2 +-
+ amd/backport/include/kcl/kcl_drm.h | 11 +++++++++++
+ amd/dal/amdgpu_dm/amdgpu_dm_types.c | 2 +-
+ 10 files changed, 27 insertions(+), 12 deletions(-)
+
+diff --git a/amd/amdgpu/amdgpu_atpx_handler.c b/amd/amdgpu/amdgpu_atpx_handler.c
+index cc9b998..7e47478 100644
+--- a/amd/amdgpu/amdgpu_atpx_handler.c
++++ b/amd/amdgpu/amdgpu_atpx_handler.c
+@@ -565,7 +565,11 @@ void amdgpu_register_atpx_handler(void)
+ if (!r)
+ return;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++ vga_switcheroo_register_handler(&amdgpu_atpx_handler, 0);
++#else
+ vga_switcheroo_register_handler(&amdgpu_atpx_handler);
++#endif
+ }
+
+ /**
+diff --git a/amd/amdgpu/amdgpu_bo_list.c b/amd/amdgpu/amdgpu_bo_list.c
+index 35d0856..1d163ec 100644
+--- a/amd/amdgpu/amdgpu_bo_list.c
++++ b/amd/amdgpu/amdgpu_bo_list.c
+@@ -106,7 +106,7 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
+ struct amdgpu_bo *bo;
+ struct mm_struct *usermm;
+
+- gobj = drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
++ gobj = kcl_drm_gem_object_lookup(adev->ddev, filp, info[i].bo_handle);
+ if (!gobj) {
+ r = -ENOENT;
+ goto error_free;
+diff --git a/amd/amdgpu/amdgpu_cs.c b/amd/amdgpu/amdgpu_cs.c
+index d16ed26..b0390b5 100644
+--- a/amd/amdgpu/amdgpu_cs.c
++++ b/amd/amdgpu/amdgpu_cs.c
+@@ -92,7 +92,7 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,
+ {
+ struct drm_gem_object *gobj;
+
+- gobj = drm_gem_object_lookup(p->adev->ddev, p->filp,
++ gobj = kcl_drm_gem_object_lookup(p->adev->ddev, p->filp,
+ data->handle);
+ if (gobj == NULL)
+ return -EINVAL;
+diff --git a/amd/amdgpu/amdgpu_display.c b/amd/amdgpu/amdgpu_display.c
+index 46326b3..9b5441f 100644
+--- a/amd/amdgpu/amdgpu_display.c
++++ b/amd/amdgpu/amdgpu_display.c
+@@ -594,7 +594,7 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
+ struct amdgpu_framebuffer *amdgpu_fb;
+ int ret;
+
+- obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
++ obj = kcl_drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
+ if (obj == NULL) {
+ dev_err(&dev->pdev->dev, "No GEM object associated to handle 0x%08X, "
+ "can't create framebuffer\n", mode_cmd->handles[0]);
+diff --git a/amd/amdgpu/amdgpu_gem.c b/amd/amdgpu/amdgpu_gem.c
+index 0069aec..d10c282 100644
+--- a/amd/amdgpu/amdgpu_gem.c
++++ b/amd/amdgpu/amdgpu_gem.c
+@@ -397,7 +397,7 @@ int amdgpu_mode_dumb_mmap(struct drm_file *filp,
+ struct drm_gem_object *gobj;
+ struct amdgpu_bo *robj;
+
+- gobj = drm_gem_object_lookup(dev, filp, handle);
++ gobj = kcl_drm_gem_object_lookup(dev, filp, handle);
+ if (gobj == NULL) {
+ return -ENOENT;
+ }
+@@ -461,7 +461,7 @@ int amdgpu_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
+ int r = 0;
+ long ret;
+
+- gobj = drm_gem_object_lookup(dev, filp, handle);
++ gobj = kcl_drm_gem_object_lookup(dev, filp, handle);
+ if (gobj == NULL) {
+ return -ENOENT;
+ }
+@@ -495,7 +495,7 @@ int amdgpu_gem_metadata_ioctl(struct drm_device *dev, void *data,
+ int r = -1;
+
+ DRM_DEBUG("%d \n", args->handle);
+- gobj = drm_gem_object_lookup(dev, filp, args->handle);
++ gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
+ if (gobj == NULL)
+ return -ENOENT;
+ robj = gem_to_amdgpu_bo(gobj);
+@@ -643,7 +643,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
+ return -EINVAL;
+ }
+
+- gobj = drm_gem_object_lookup(dev, filp, args->handle);
++ gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
+ if (gobj == NULL)
+ return -ENOENT;
+ rbo = gem_to_amdgpu_bo(gobj);
+@@ -705,7 +705,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
+ struct amdgpu_bo *robj;
+ int r;
+
+- gobj = drm_gem_object_lookup(dev, filp, args->handle);
++ gobj = kcl_drm_gem_object_lookup(dev, filp, args->handle);
+ if (gobj == NULL) {
+ return -ENOENT;
+ }
+diff --git a/amd/amdgpu/dce_v10_0.c b/amd/amdgpu/dce_v10_0.c
+index 7554dd7..6d38754 100644
+--- a/amd/amdgpu/dce_v10_0.c
++++ b/amd/amdgpu/dce_v10_0.c
+@@ -2594,7 +2594,7 @@ static int dce_v10_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ return -EINVAL;
+ }
+
+- obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++ obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+ if (!obj) {
+ DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ return -ENOENT;
+diff --git a/amd/amdgpu/dce_v11_0.c b/amd/amdgpu/dce_v11_0.c
+index d9c9b88..93dbc1a 100644
+--- a/amd/amdgpu/dce_v11_0.c
++++ b/amd/amdgpu/dce_v11_0.c
+@@ -2604,7 +2604,7 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ return -EINVAL;
+ }
+
+- obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++ obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+ if (!obj) {
+ DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ return -ENOENT;
+diff --git a/amd/amdgpu/dce_v8_0.c b/amd/amdgpu/dce_v8_0.c
+index 7a027ce..c56a298 100644
+--- a/amd/amdgpu/dce_v8_0.c
++++ b/amd/amdgpu/dce_v8_0.c
+@@ -2501,7 +2501,7 @@ static int dce_v8_0_crtc_cursor_set2(struct drm_crtc *crtc,
+ return -EINVAL;
+ }
+
+- obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++ obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+ if (!obj) {
+ DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, amdgpu_crtc->crtc_id);
+ return -ENOENT;
+diff --git a/amd/backport/include/kcl/kcl_drm.h b/amd/backport/include/kcl/kcl_drm.h
+index a65ee25..5a8a7b3 100644
+--- a/amd/backport/include/kcl/kcl_drm.h
++++ b/amd/backport/include/kcl/kcl_drm.h
+@@ -3,6 +3,7 @@
+
+ #include <linux/version.h>
+ #include <drm/drmP.h>
++#include <drm/drm_gem.h>
+
+ #if defined(BUILD_AS_DKMS)
+ extern int drm_pcie_get_max_link_width(struct drm_device *dev, u32 *mlw);
+@@ -123,4 +124,14 @@ static inline int kcl_drm_universal_plane_init(struct drm_device *dev, struct dr
+ #endif
+ }
+
++static inline struct drm_gem_object *kcl_drm_gem_object_lookup(struct drm_device *dev,
++ struct drm_file *filp,
++ u32 handle) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++ return drm_gem_object_lookup(filp, handle);
++#else
++ return drm_gem_object_lookup(dev, filp, handle);
++#endif
++}
++
+ #endif /* AMDGPU_BACKPORT_KCL_DRM_H */
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+index 3f357a5..2e2d2e6 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+@@ -152,7 +152,7 @@ static int dm_crtc_pin_cursor_bo_new(
+
+ amdgpu_crtc = to_amdgpu_crtc(crtc);
+
+- obj = drm_gem_object_lookup(crtc->dev, file_priv, handle);
++ obj = kcl_drm_gem_object_lookup(crtc->dev, file_priv, handle);
+
+ if (!obj) {
+ DRM_ERROR(
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch
new file mode 100644
index 000000000000..54394b7879be
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0004-paging-changes-for-linux-4.6.patch
@@ -0,0 +1,42 @@
+From 2bd83488ccea22bb9e399986c171cccc3b6beb93 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:40:32 -0300
+Subject: [PATCH 4/8] paging changes for linux-4.6
+
+---
+ amd/amdgpu/amdgpu_ttm.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
+index 7bdebde..8b676c2 100644
+--- a/amd/amdgpu/amdgpu_ttm.c
++++ b/amd/amdgpu/amdgpu_ttm.c
+@@ -548,8 +548,12 @@ int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages)
+ list_add(&guptask.list, &gtt->guptasks);
+ spin_unlock(&gtt->guptasklock);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++ r = get_user_pages(userptr, num_pages, write, 0, p, NULL);
++#else
+ r = get_user_pages(current, current->mm, userptr, num_pages,
+- write, 0, p, NULL);
++ write, 0, p, NULL);
++#endif
+
+ spin_lock(&gtt->guptasklock);
+ list_del(&guptask.list);
+@@ -625,7 +629,11 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
+ set_page_dirty(page);
+
+ mark_page_accessed(page);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
++ put_page(page);
++#else
+ page_cache_release(page);
++#endif
+ }
+
+ sg_free_table(ttm->sg);
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
new file mode 100644
index 000000000000..6da3e46a3ee6
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0005-LRU-stuff-isn-t-available-until-4.7.x.patch
@@ -0,0 +1,48 @@
+From c41c15fa04e363c41272e7b5d767710170691347 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Mon, 4 Jul 2016 19:19:45 +0100
+Subject: [PATCH 5/8] LRU stuff isn't available until >= 4.7.x
+
+---
+ amd/amdgpu/amdgpu_ttm.c | 4 ++--
+ amd/backport/kcl_ttm.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/amd/amdgpu/amdgpu_ttm.c b/amd/amdgpu/amdgpu_ttm.c
+index 8b676c2..752d065 100644
+--- a/amd/amdgpu/amdgpu_ttm.c
++++ b/amd/amdgpu/amdgpu_ttm.c
+@@ -907,7 +907,7 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm,
+ return flags;
+ }
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+
+ static void amdgpu_ttm_lru_removal(struct ttm_buffer_object *tbo)
+ {
+@@ -969,7 +969,7 @@ static struct ttm_bo_driver amdgpu_bo_driver = {
+ .fault_reserve_notify = &amdgpu_bo_fault_reserve_notify,
+ .io_mem_reserve = &amdgpu_ttm_io_mem_reserve,
+ .io_mem_free = &amdgpu_ttm_io_mem_free,
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+ .lru_removal = &amdgpu_ttm_lru_removal,
+ .lru_tail = &amdgpu_ttm_lru_tail,
+ .swap_lru_tail = &amdgpu_ttm_swap_lru_tail,
+diff --git a/amd/backport/kcl_ttm.c b/amd/backport/kcl_ttm.c
+index 24f7a83..1a2cb7b 100644
+--- a/amd/backport/kcl_ttm.c
++++ b/amd/backport/kcl_ttm.c
+@@ -7,7 +7,7 @@ static int _kcl_ttm_bo_del_from_lru(struct ttm_buffer_object *bo)
+ {
+ int put_count = 0;
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+ struct ttm_bo_device *bdev = bo->bdev;
+
+ if (bdev->driver->lru_removal)
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
new file mode 100644
index 000000000000..5be5acad00d6
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0006-Change-name-of-vblank_disable_allowed-to-vblank_disa.patch
@@ -0,0 +1,29 @@
+From 5b90b8d8ab44637c707623b25ee98aa4ebded308 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Mon, 4 Jul 2016 19:30:08 +0100
+Subject: [PATCH 6/8] Change name of vblank_disable_allowed to
+ vblank_disable_immediate under 4.7.x.
+
+---
+ amd/amdgpu/amdgpu_irq.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/amd/amdgpu/amdgpu_irq.c b/amd/amdgpu/amdgpu_irq.c
+index d13865a..5cfa69f 100644
+--- a/amd/amdgpu/amdgpu_irq.c
++++ b/amd/amdgpu/amdgpu_irq.c
+@@ -240,7 +240,11 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
+ INIT_WORK(&adev->hotplug_work,
+ amdgpu_hotplug_work_func);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++ adev->ddev->vblank_disable_immediate = true;
++#else
+ adev->ddev->vblank_disable_allowed = true;
++#endif
+
+ INIT_WORK(&adev->reset_work, amdgpu_irq_reset_work_func);
+
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
new file mode 100644
index 000000000000..13d4a282ac82
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0007-Remove-connector-parameter-from-__drm_atomic_helper_.patch
@@ -0,0 +1,29 @@
+From 27ef2ce0d4d8eeb3bca32ddeae503f0a334832aa Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Mon, 4 Jul 2016 19:41:08 +0100
+Subject: [PATCH 7/8] Remove connector parameter from
+ __drm_atomic_helper_connector_destroy_state for 4.7.x kernels.
+
+---
+ amd/dal/amdgpu_dm/amdgpu_dm_types.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+index 2e2d2e6..cd34607 100644
+--- a/amd/dal/amdgpu_dm/amdgpu_dm_types.c
++++ b/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+@@ -1205,7 +1205,11 @@ void amdgpu_dm_connector_atomic_destroy_state(
+ struct dm_connector_state *dm_state =
+ to_dm_connector_state(state);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
++ __drm_atomic_helper_connector_destroy_state(state);
++#else
+ __drm_atomic_helper_connector_destroy_state(connector, state);
++#endif
+
+ kfree(dm_state);
+ }
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
new file mode 100644
index 000000000000..693ad8b2f40d
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0008-fix-apparent-typo-in-bandwidth_calcs-causing-array-e.patch
@@ -0,0 +1,25 @@
+From c9f2501131da0d9173e21f7e8ff5741a7fcfedb6 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Sun, 21 Aug 2016 16:58:45 -0300
+Subject: [PATCH 8/8] fix apparent typo in bandwidth_calcs causing array error
+
+---
+ amd/dal/dc/calcs/bandwidth_calcs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/amd/dal/dc/calcs/bandwidth_calcs.c b/amd/dal/dc/calcs/bandwidth_calcs.c
+index 8a19139..c4ededd 100644
+--- a/amd/dal/dc/calcs/bandwidth_calcs.c
++++ b/amd/dal/dc/calcs/bandwidth_calcs.c
+@@ -3181,7 +3181,7 @@ static void calculate_bandwidth(
+ bw_int_to_fixed(
+ 2),
+ vbios->mcifwrmc_urgent_latency),
+- results->dmif_burst_time[i][j]),
++ results->dmif_burst_time[results->y_clk_level][results->sclk_level]),
+ results->mcifwr_burst_time[results->y_clk_level][results->sclk_level])),
+ results->dispclk),
+ bw_int_to_fixed(
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch
new file mode 100644
index 000000000000..05bcbf8bd061
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0009-disable-dal-by-default.patch
@@ -0,0 +1,25 @@
+From 49d45957ddaafe13a9cc7bacd1b9665fe9c517ac Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Thu, 25 Aug 2016 22:17:06 -0300
+Subject: [PATCH] disable dal by default
+
+---
+ amd/amdgpu/amdgpu_drv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/amd/amdgpu/amdgpu_drv.c b/amd/amdgpu/amdgpu_drv.c
+index 793528b..9a4dfcc 100644
+--- a/amd/amdgpu/amdgpu_drv.c
++++ b/amd/amdgpu/amdgpu_drv.c
+@@ -79,7 +79,7 @@ int amdgpu_vm_block_size = -1;
+ int amdgpu_vm_fault_stop = 0;
+ int amdgpu_vm_debug = 0;
+ int amdgpu_exp_hw_support = 0;
+-int amdgpu_dal = -1;
++int amdgpu_dal = 0;
+ int amdgpu_sched_jobs = 32;
+ int amdgpu_sched_hw_submission = 2;
+ int amdgpu_powerplay = -1;
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch b/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch
new file mode 100644
index 000000000000..ec8f2c5a5999
--- /dev/null
+++ b/pkgs/os-specific/linux/amdgpu-pro/patches/0010-remove-dependency-on-System.map.patch
@@ -0,0 +1,112 @@
+From fbc0d704f47526ca38f518b60237962cc6b08305 Mon Sep 17 00:00:00 2001
+From: David McFarland <corngood@gmail.com>
+Date: Thu, 25 Aug 2016 23:08:02 -0300
+Subject: [PATCH] remove dependency on System.map
+
+---
+ amd/backport/Makefile | 3 +--
+ amd/backport/kcl_fence.c | 10 ++++++++--
+ amd/backport/symbols | 3 ---
+ dkms.conf | 1 -
+ pre-build.sh | 32 --------------------------------
+ 5 files changed, 9 insertions(+), 40 deletions(-)
+ delete mode 100644 amd/backport/symbols
+ delete mode 100755 pre-build.sh
+
+diff --git a/amd/backport/Makefile b/amd/backport/Makefile
+index 6447a15..4682e0f 100644
+--- a/amd/backport/Makefile
++++ b/amd/backport/Makefile
+@@ -53,10 +53,9 @@ ccflags-y += -DOS_NAME_RHEL_7
+ endif
+ endif
+
+-BACKPORT_OBJS = symbols.o
+ endif
+
+-BACKPORT_OBJS += kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
++BACKPORT_OBJS = kcl_drm.o kcl_ttm.o kcl_amdgpu.o kcl_fence.o kcl_mn.o
+
+ amdgpu-y += $(addprefix ../backport/,$(BACKPORT_OBJS))
+
+diff --git a/amd/backport/kcl_fence.c b/amd/backport/kcl_fence.c
+index 2141eef..ceef1fe 100644
+--- a/amd/backport/kcl_fence.c
++++ b/amd/backport/kcl_fence.c
+@@ -22,8 +22,14 @@ struct default_wait_cb {
+ struct task_struct *task;
+ };
+
+-extern void
+-(*fence_default_wait_cb)(struct fence *fence, struct fence_cb *cb);
++static void
++fence_default_wait_cb(struct fence *fence, struct fence_cb *cb)
++{
++ struct default_wait_cb *wait =
++ container_of(cb, struct default_wait_cb, base);
++
++ wake_up_process(wait->task);
++}
+
+ signed long
+ _kcl_fence_wait_any_timeout(struct fence **fences, uint32_t count,
+diff --git a/amd/backport/symbols b/amd/backport/symbols
+deleted file mode 100644
+index 2d3f2ee..0000000
+--- a/amd/backport/symbols
++++ /dev/null
+@@ -1,3 +0,0 @@
+-SYMS=""
+-
+-SYMS+="fence_default_wait_cb"
+diff --git a/dkms.conf b/dkms.conf
+index 9ca148e..36be480 100644
+--- a/dkms.conf
++++ b/dkms.conf
+@@ -4,4 +4,3 @@ BUILT_MODULE_NAME[0]="amdgpu"
+ BUILT_MODULE_LOCATION[0]="amd/amdgpu"
+ DEST_MODULE_LOCATION[0]="/extra"
+ AUTOINSTALL="yes"
+-PRE_BUILD="pre-build.sh $kernelver"
+\ No newline at end of file
+diff --git a/pre-build.sh b/pre-build.sh
+deleted file mode 100755
+index 88ec680..0000000
+--- a/pre-build.sh
++++ /dev/null
+@@ -1,32 +0,0 @@
+-#!/bin/bash
+-
+-KERNELVER=$1
+-KERNELVER_BASE=${KERNELVER%%-*}
+-
+-version_lt () {
+- newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
+- [ "$1" != "$newest" ]
+-}
+-
+-version_ge () {
+- newest=$((echo "$1"; echo "$2") | sort -V | tail -n1)
+- [ "$1" = "$newest" ]
+-}
+-
+-version_gt () {
+- oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
+- [ "$1" != "$oldest" ]
+-}
+-
+-version_le () {
+- oldest=$((echo "$1"; echo "$2") | sort -V | head -n1)
+- [ "$1" = "$oldest" ]
+-}
+-
+-source amd/backport/symbols
+-
+-echo '// auto generated by DKMS pre-build.sh' > amd/backport/symbols.c
+-for sym in $SYMS; do
+- addr=$(grep $sym /boot/System.map-$KERNELVER | awk -F' ' '{print $1}')
+- echo "void *$sym = (void *)0x$addr;" >> amd/backport/symbols.c
+-done
+--
+2.9.3
+
diff --git a/pkgs/os-specific/linux/android-udev-rules/default.nix b/pkgs/os-specific/linux/android-udev-rules/default.nix
index cae5fe4329d4..a779b53d3a5f 100644
--- a/pkgs/os-specific/linux/android-udev-rules/default.nix
+++ b/pkgs/os-specific/linux/android-udev-rules/default.nix
@@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
name = "android-udev-rules-${version}";
- version = "20160805";
+ version = "20161014";
src = fetchFromGitHub {
owner = "M0Rf30";
repo = "android-udev-rules";
rev = version;
- sha256 = "0sdf3insqs73cdzmwl3lqy7nj82f1lprxd3vm0jh3qpf0sd1k93c";
+ sha256 = "0xc7wslxf7xsvfbd83wsw4nikmpq1zfd607y2p2r3j1vkw1yak08";
};
installPhase = ''
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix
index f58a7557ce35..b576ca71d580 100644
--- a/pkgs/os-specific/linux/apparmor/default.nix
+++ b/pkgs/os-specific/linux/apparmor/default.nix
@@ -82,7 +82,6 @@ let
buildInputs = [
perl
pythonPackages.python
- pythonPackages.readline
libapparmor
libapparmor.python
];
diff --git a/pkgs/os-specific/linux/broadcom-sta/default.nix b/pkgs/os-specific/linux/broadcom-sta/default.nix
index 1fb1e1873d96..c3842959883a 100644
--- a/pkgs/os-specific/linux/broadcom-sta/default.nix
+++ b/pkgs/os-specific/linux/broadcom-sta/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, kernel }:
+{ stdenv, fetchurl, fetchpatch, kernel }:
let
version = "6.30.223.271";
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://www.broadcom.com/docs/linux_sta/${tarball}";
- sha256 = hashes.${stdenv.system};
+ sha256 = hashes."${stdenv.system}";
};
hardeningDisable = [ "pic" ];
@@ -27,6 +27,11 @@ stdenv.mkDerivation {
./linux-4.7.patch
./null-pointer-fix.patch
./gcc.patch
+ (fetchpatch {
+ name = "linux-4.8.patch";
+ url = "https://aur.archlinux.org/cgit/aur.git/plain/004-linux48.patch?h=broadcom-wl-dkms";
+ sha256 = "0s8apf6l3qm9kln451g4z0pr13f4jdgyval1vfl2abg0dqc5xfhs";
+ })
];
makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}";
diff --git a/pkgs/os-specific/linux/busybox/busybox-in-store.patch b/pkgs/os-specific/linux/busybox/busybox-in-store.patch
index ab072efd930d..3500f167a14a 100644
--- a/pkgs/os-specific/linux/busybox/busybox-in-store.patch
+++ b/pkgs/os-specific/linux/busybox/busybox-in-store.patch
@@ -1,15 +1,14 @@
Allow BusyBox to be invoked as "<something>-busybox". This is
necessary when it's run from the Nix store as <hash>-busybox during
stdenv bootstrap.
-
---- busybox-1.24.2-orig/libbb/appletlib.c 2016-03-17 21:35:49.000000000 +0100
-+++ busybox-1.24.2/libbb/appletlib.c 2016-09-25 08:48:18.293104041 +0200
-@@ -779,7 +779,7 @@
- int applet = find_applet_by_name(name);
- if (applet >= 0)
- run_applet_no_and_exit(applet, argv);
+--- busybox-1.25.1-orig/libbb/appletlib.orig 2016-10-26 19:54:20.510957575 -0400
++++ busybox-1.25.1/libbb/appletlib.c 2016-10-26 19:48:31.590862853 -0400
+@@ -884,7 +884,7 @@
+ int applet;
+
+ # if ENABLE_BUSYBOX
- if (is_prefixed_with(name, "busybox"))
+ if (strstr(name, "busybox") != 0)
exit(busybox_main(argv));
- }
-
+ # endif
+ /* find_applet_by_name() search is more expensive, so goes second */
diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix
index 2563c4428223..6f86529a265e 100644
--- a/pkgs/os-specific/linux/busybox/default.nix
+++ b/pkgs/os-specific/linux/busybox/default.nix
@@ -26,11 +26,11 @@ let
in
stdenv.mkDerivation rec {
- name = "busybox-1.24.2";
+ name = "busybox-1.25.1";
src = fetchurl {
url = "http://busybox.net/downloads/${name}.tar.bz2";
- sha256 = "0mf8f6ly8yi1fbr15jkyv6hxwh2x800x661rcd11rwsnqqzga7p7";
+ sha256 = "0bm0l8xdjdz3kdyajp8wg27yamsw7r2y88nnrxwvvz984c7pwri7";
};
hardeningDisable = [ "format" ] ++ lib.optional enableStatic [ "fortify" ];
diff --git a/pkgs/os-specific/linux/cachefilesd/default.nix b/pkgs/os-specific/linux/cachefilesd/default.nix
new file mode 100644
index 000000000000..99cb7d264fec
--- /dev/null
+++ b/pkgs/os-specific/linux/cachefilesd/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ name = "cachefilesd-${version}";
+ version = "0.10.9";
+
+ src = fetchurl {
+ url = "https://people.redhat.com/dhowells/fscache/${name}.tar.bz2";
+ sha256 = "1jkb3qd8rcmli3g2qgcpp1f9kklil4qgy86w7pg2cpv10ikyr5y8";
+ };
+
+ installFlags = [
+ "ETCDIR=$(out)/etc"
+ "SBINDIR=$(out)/sbin"
+ "MANDIR=$(out)/share/man"
+ ];
+
+ meta = with stdenv.lib; {
+ description = "Local network file caching management daemon";
+ homepage = "https://people.redhat.com/dhowells/fscache/";
+ license = licenses.gpl2Plus;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ abbradar ];
+ };
+}
diff --git a/pkgs/os-specific/linux/conky/default.nix b/pkgs/os-specific/linux/conky/default.nix
index 37ad34d8b642..674f3caa7653 100644
--- a/pkgs/os-specific/linux/conky/default.nix
+++ b/pkgs/os-specific/linux/conky/default.nix
@@ -62,13 +62,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "conky-${version}";
- version = "1.10.3";
+ version = "1.10.5";
src = fetchFromGitHub {
owner = "brndnmtthws";
repo = "conky";
rev = "v${version}";
- sha256 = "0sa2jl159jk5p2hr37adwq84m0ynva7v87qrwj1xv0kw8l4qzhjs";
+ sha256 = "1x1b7h4s8f8qbiyas7sw5v2nq5h2wy3q7hsp1ah4l7191jjidqix";
};
postPatch = ''
@@ -102,7 +102,7 @@ stdenv.mkDerivation rec {
++ optional weatherXoapSupport libxml2
;
- cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]
+ cmakeFlags = []
++ optional docsSupport "-DMAINTAINER_MODE=ON"
++ optional curlSupport "-DBUILD_CURL=ON"
++ optional (!ibmSupport) "-DBUILD_IBM=OFF"
diff --git a/pkgs/os-specific/linux/crda/default.nix b/pkgs/os-specific/linux/crda/default.nix
index d28ae6f50989..ac6117cd599f 100644
--- a/pkgs/os-specific/linux/crda/default.nix
+++ b/pkgs/os-specific/linux/crda/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libgcrypt, libnl, pkgconfig, pythonPackages, wireless-regdb }:
+{ stdenv, fetchurl, libgcrypt, libnl, pkgconfig, python2Packages, wireless-regdb }:
stdenv.mkDerivation rec {
name = "crda-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libgcrypt libnl ];
nativeBuildInputs = [
- pkgconfig pythonPackages.m2crypto pythonPackages.python
+ pkgconfig python2Packages.m2crypto python2Packages.python
];
postPatch = ''
diff --git a/pkgs/os-specific/linux/facetimehd/default.nix b/pkgs/os-specific/linux/facetimehd/default.nix
index de726d5b42c9..a9cea506c97a 100644
--- a/pkgs/os-specific/linux/facetimehd/default.nix
+++ b/pkgs/os-specific/linux/facetimehd/default.nix
@@ -3,25 +3,40 @@
# facetimehd is not supported for kernels older than 3.19";
assert stdenv.lib.versionAtLeast kernel.version "3.19";
+let
+ # Note: When updating this revision:
+ # 1. Also update pkgs/os-specific/linux/firmware/facetimehd-firmware/
+ # 2. Test the module and firmware change via:
+ # a. Give some applications a try (Skype, Hangouts, Cheese, etc.)
+ # b. Run: journalctl -f
+ # c. Then close the lid
+ # d. Then open the lid (and maybe press a key to wake it up)
+ # e. see if the module loads back (apps using the camera won't
+ # recover and will have to be restarted) and the camera
+ # still works.
+ srcParams = if (stdenv.lib.versionAtLeast kernel.version "4.8") then
+ { # Use mainline branch
+ version = "unstable-2016-10-09";
+ rev = "887d0f531ef7b91457be519474136c3355c5132b";
+ sha256 = "0bayahnxar1q6wvf9cb6p8gsfw98w0wqp715hs4r7apmddwk9v7n";
+ }
+ else
+ { # Use master branch (broken on 4.8)
+ version = "unstable-2016-05-02";
+ rev = "5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c";
+ sha256 = "0d455kajvn5xav9iilqy7s1qvsy4yb8vzjjxx7bvcgp7aj9ljvdp";
+ }
+ ;
+in
+
stdenv.mkDerivation rec {
name = "facetimehd-${version}-${kernel.version}";
- version = "git-20160503";
+ version = srcParams.version;
src = fetchFromGitHub {
owner = "patjak";
repo = "bcwc_pcie";
- # Note: When updating this revision:
- # 1. Also update pkgs/os-specific/linux/firmware/facetimehd-firmware/
- # 2. Test the module and firmware change via:
- # a. Give some applications a try (Skype, Hangouts, Cheese, etc.)
- # b. Run: journalctl -f
- # c. Then close the lid
- # d. Then open the lid (and maybe press a key to wake it up)
- # e. see if the module loads back (apps using the camera won't
- # recover and will have to be restarted) and the camera
- # still works.
- rev = "5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c";
- sha256 = "0d455kajvn5xav9iilqy7s1qvsy4yb8vzjjxx7bvcgp7aj9ljvdp";
+ inherit (srcParams) rev sha256;
};
preConfigure = ''
diff --git a/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix b/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix
index bfcef1d9c1aa..c87023bf336d 100644
--- a/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix
+++ b/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
description = "Firmware for Intel 2200BG cards";
homepage = http://ipw2200.sourceforge.net/firmware.php;
license = stdenv.lib.licenses.unfreeRedistributableFirmware;
- maintainers = with maintainers; [ lukasepple ];
+ maintainers = with maintainers; [ sternenseemann ];
platforms = with platforms; linux;
};
}
diff --git a/pkgs/os-specific/linux/google-authenticator/default.nix b/pkgs/os-specific/linux/google-authenticator/default.nix
index 3402f7a7013f..0e5f62083829 100644
--- a/pkgs/os-specific/linux/google-authenticator/default.nix
+++ b/pkgs/os-specific/linux/google-authenticator/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pam, qrencode }:
+{ stdenv, lib, fetchurl, pam, qrencode }:
stdenv.mkDerivation rec {
name = "google-authenticator-1.0";
@@ -20,10 +20,11 @@ stdenv.mkDerivation rec {
cp google-authenticator $out/bin
'';
- meta = {
+ meta = with lib; {
homepage = https://code.google.com/p/google-authenticator/;
description = "Two-step verification, with pam module";
- license = stdenv.lib.licenses.asl20;
- platforms = stdenv.lib.platforms.linux;
+ license = licenses.asl20;
+ maintainers = with maintainers; [ aneeshusa ];
+ platforms = platforms.linux;
};
}
diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix
index 40af8c8553a1..5385651030bc 100644
--- a/pkgs/os-specific/linux/guvcview/default.nix
+++ b/pkgs/os-specific/linux/guvcview/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
portaudio
udev
gsl
- ] ++ stdenv.lib.optional pulseaudioSupport [ libpulseaudio ];
+ ] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio;
meta = {
description = "A simple interface for devices supported by the linux UVC driver";
diff --git a/pkgs/os-specific/linux/iotop/default.nix b/pkgs/os-specific/linux/iotop/default.nix
index 505468d849a6..a19b3d4ec16c 100644
--- a/pkgs/os-specific/linux/iotop/default.nix
+++ b/pkgs/os-specific/linux/iotop/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, pythonPackages }:
+{ stdenv, fetchurl, python2Packages }:
-pythonPackages.buildPythonApplication rec {
+python2Packages.buildPythonApplication rec {
name = "iotop-0.6";
src = fetchurl {
@@ -8,8 +8,6 @@ pythonPackages.buildPythonApplication rec {
sha256 = "0nzprs6zqax0cwq8h7hnszdl3d2m4c2d4vjfxfxbnjfs9sia5pis";
};
- propagatedBuildInputs = [ pythonPackages.curses ];
-
doCheck = false;
meta = {
diff --git a/pkgs/os-specific/linux/jool/cli.nix b/pkgs/os-specific/linux/jool/cli.nix
index 8fb37ed1c5b8..c8775eee48c6 100644
--- a/pkgs/os-specific/linux/jool/cli.nix
+++ b/pkgs/os-specific/linux/jool/cli.nix
@@ -13,6 +13,10 @@ stdenv.mkDerivation {
buildInputs = [ autoreconfHook pkgconfig libnl ];
+ postPatch = ''
+ chmod u+w -R ../common
+ '';
+
meta = with stdenv.lib; {
homepage = https://www.jool.mx/;
description = "Fairly compliant SIIT and Stateful NAT64 for Linux - CLI tools";
diff --git a/pkgs/os-specific/linux/jool/default.nix b/pkgs/os-specific/linux/jool/default.nix
index 274d0cc41394..79094ebb3e38 100644
--- a/pkgs/os-specific/linux/jool/default.nix
+++ b/pkgs/os-specific/linux/jool/default.nix
@@ -28,7 +28,5 @@ stdenv.mkDerivation {
description = "Fairly compliant SIIT and Stateful NAT64 for Linux - kernel modules";
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz ];
- # kernel version 4.3 is the most recent supported version
- broken = builtins.compareVersions kernel.version "4.3" == 1;
};
}
diff --git a/pkgs/os-specific/linux/jool/source.nix b/pkgs/os-specific/linux/jool/source.nix
index 48ba70e620e8..0f2038fb2e39 100644
--- a/pkgs/os-specific/linux/jool/source.nix
+++ b/pkgs/os-specific/linux/jool/source.nix
@@ -1,9 +1,9 @@
{ fetchzip }:
rec {
- version = "3.4.5";
+ version = "3.5.0";
src = fetchzip {
url = "https://github.com/NICMx/releases/raw/master/Jool/Jool-${version}.zip";
- sha256 = "045j3ax6c5jg8037hhrbgqgznr0a114xrmn03wkasnvsxpsx4hkb";
+ sha256 = "06jp6gpfryn66q0z4w3gwkvfr17bcrjvys597nj49pxfiz4vczb2";
};
}
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index d7dab32e2971..4d5fac82d93c 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -180,7 +180,7 @@ with stdenv.lib;
VGA_SWITCHEROO y # Hybrid graphics support
DRM_GMA600 y
DRM_GMA3600 y
- ${optionalString (versionAtLeast version "4.5") ''
+ ${optionalString (versionAtLeast version "4.5" && (versionOlder version "4.9")) ''
DRM_AMD_POWERPLAY y # necessary for amdgpu polaris support
''}
@@ -210,6 +210,7 @@ with stdenv.lib;
# ACLs for all filesystems that support them.
FANOTIFY y
TMPFS y
+ FS_ENCRYPTION? m
EXT2_FS_XATTR y
EXT2_FS_POSIX_ACL y
EXT2_FS_SECURITY y
@@ -219,6 +220,7 @@ with stdenv.lib;
EXT3_FS_POSIX_ACL y
EXT3_FS_SECURITY y
EXT4_FS_POSIX_ACL y
+ EXT4_ENCRYPTION? ${if versionOlder version "4.8" then "m" else "y"}
EXT4_FS_SECURITY y
REISERFS_FS_XATTR? y
REISERFS_FS_POSIX_ACL? y
@@ -231,6 +233,10 @@ with stdenv.lib;
OCFS2_DEBUG_MASKLOG? n
BTRFS_FS_POSIX_ACL y
UBIFS_FS_ADVANCED_COMPR? y
+ F2FS_FS m
+ F2FS_FS_SECURITY? y
+ F2FS_FS_ENCRYPTION? y
+ UDF_FS m
${optionalString (versionAtLeast version "4.0" && versionOlder version "4.6") ''
NFSD_PNFS y
''}
@@ -284,6 +290,7 @@ with stdenv.lib;
RANDOMIZE_BASE? y
STRICT_DEVMEM y # Filter access to /dev/mem
SECURITY_SELINUX_BOOTPARAM_VALUE 0 # Disable SELinux by default
+ SECURITY_YAMA? y # Prevent processes from ptracing non-children processes
DEVKMEM n # Disable /dev/kmem
${if versionOlder version "3.14" then ''
CC_STACKPROTECTOR? y # Detect buffer overflows on the stack
@@ -395,7 +402,7 @@ with stdenv.lib;
# Linux containers.
NAMESPACES? y # Required by 'unshare' used by 'nixos-install'
- RT_GROUP_SCHED? y
+ RT_GROUP_SCHED n
CGROUP_DEVICE? y
MEMCG y
MEMCG_SWAP y
diff --git a/pkgs/os-specific/linux/kernel/grsecurity-nixos-config.nix b/pkgs/os-specific/linux/kernel/grsecurity-nixos-config.nix
index 4c81cd5b6ad0..2193dabd0bc4 100644
--- a/pkgs/os-specific/linux/kernel/grsecurity-nixos-config.nix
+++ b/pkgs/os-specific/linux/kernel/grsecurity-nixos-config.nix
@@ -3,42 +3,56 @@
with stdenv.lib;
''
-GRKERNSEC y
-PAX y
-
+# Auto configuration with these constraints will enable most of the
+# important features (RAP, UDEREF, ASLR, memory sanitization).
GRKERNSEC_CONFIG_AUTO y
GRKERNSEC_CONFIG_DESKTOP y
-GRKERNSEC_CONFIG_VIRT_HOST y
+GRKERNSEC_CONFIG_PRIORITY_SECURITY y
+
+# We specify virt guest rather than host here, the latter deselects e.g.,
+# paravirtualization.
+GRKERNSEC_CONFIG_VIRT_GUEST y
+# Note: assumes platform supports CPU-level virtualization (so no pentium 4)
GRKERNSEC_CONFIG_VIRT_EPT y
GRKERNSEC_CONFIG_VIRT_KVM y
-GRKERNSEC_CONFIG_PRIORITY_SECURITY y
+# PaX control
PAX_SOFTMODE y
-
PAX_PT_PAX_FLAGS y
PAX_XATTR_PAX_FLAGS y
PAX_EI_PAX n
-GRKERNSEC_PROC_GID 0
+# The bts instrumentation method is compatible with binary only modules.
+#
+# Note: if platform supports SMEP, we could do without this
+PAX_KERNEXEC_PLUGIN_METHOD_BTS y
-PAX_LATENT_ENTROPY n
+# Additional grsec hardening not implied by auto constraints
+GRKERNSEC_IO y
+# Disable protections rendered useless by redistribution
GRKERNSEC_HIDESYM n
GRKERNSEC_RANDSTRUCT n
-GRKERNSEC_PROC n
-GRKERNSEC_SYSFS_RESTRICT n
-GRKERNSEC_KMEM n
-GRKERNSEC_MODHARDEN n
-GRKERNSEC_NO_SIMULT_CONNECT n
-PAX_KERNEXEC_PLUGIN_METHOD_BTS y
+# Disable protections covered by vanilla mechanisms
+GRKERNSEC_DMESG n
+GRKERNSEC_KMEM n
+GRKERNSEC_PROC n
-GRKERNSEC_ACL_HIDEKERN y
-GRKERNSEC_IO y
+# Disable protections that are inappropriate for a general-purpose kernel
+GRKERNSEC_NO_SIMULT_CONNECT n
+# Enable additional audititing
+GRKERNSEC_AUDIT_MOUNT y
GRKERNSEC_AUDIT_PTRACE y
GRKERNSEC_FORKFAIL y
+# Wishlist: support trusted path execution
+GRKERNSEC_TPE n
+
+# Wishlist: enable this, but breaks user initiated module loading
+GRKERNSEC_MODHARDEN n
+
GRKERNSEC_SYSCTL y
GRKERNSEC_SYSCTL_DISTRO y
GRKERNSEC_SYSCTL_ON y
diff --git a/pkgs/os-specific/linux/kernel/linux-3.10.nix b/pkgs/os-specific/linux/kernel/linux-3.10.nix
index a46a75c01caf..3e6bd51cc475 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.10.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.10.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.10.103";
+ version = "3.10.104";
extraMeta.branch = "3.10";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "008dz40zig0fhkm3hjmcn0kn5b1sfvpxb7dc4fbsddb6gifrh44v";
+ sha256 = "04kc64zdpg8h8655m825lbny3fwvqhmh3mg9h564i2irnll35lp3";
};
kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.12.nix b/pkgs/os-specific/linux/kernel/linux-3.12.nix
index e14d722ad5df..48f12307bd15 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.12.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.12.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.12.63";
+ version = "3.12.66";
extraMeta.branch = "3.12";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "0srg7xd68n10b28c3l5qa4dx5qr84ci7fdn48wcj79y7h2s0367x";
+ sha256 = "02nac7sr0c1h10mxp5azlsmz0gsr7qllsn2hibjknhk7jg8ry8cc";
};
kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-3.18.nix b/pkgs/os-specific/linux/kernel/linux-3.18.nix
index 75f5d6de6311..4a18f2e498b9 100644
--- a/pkgs/os-specific/linux/kernel/linux-3.18.nix
+++ b/pkgs/os-specific/linux/kernel/linux-3.18.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "3.18.42";
+ version = "3.18.44";
extraMeta.branch = "3.18";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
- sha256 = "0ymimvy8kp2a2x0h31m3sipwx1h80576ws04k3cl49wgcgjwpwn4";
+ sha256 = "1cjdh9w2q164r53k06vv6nhxwjzm69nha5wndp8r1hjywjwcqqan";
};
kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-4.1.nix b/pkgs/os-specific/linux/kernel/linux-4.1.nix
index 43b69196b8c8..67d8d267b546 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.1.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.1.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "4.1.33";
+ version = "4.1.35";
extraMeta.branch = "4.1";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
- sha256 = "15ms5mvvf0wpmscv8l5irp4j7j3l6k61hcjx9ln41pz6si00zj3l";
+ sha256 = "0jn09hs91d5fi6615v9fnbpggyh1x192q6faggpbb90q110g0jjl";
};
kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix
index 04b759ae0e6b..bb86b41fd217 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.4.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "4.4.23";
+ version = "4.4.28";
extraMeta.branch = "4.4";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
- sha256 = "1ljvga8c6p3aww3jpi810rvf4m9qr1rjy8ya6s1xq07b08g5hpbk";
+ sha256 = "1z7ln5llv67n2y9k6ihy4l4zm03yabhma8xhc0psp4x8168wn6l4";
};
kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-4.7.nix b/pkgs/os-specific/linux/kernel/linux-4.8.nix
index f08d594a3957..0a2da1656386 100644
--- a/pkgs/os-specific/linux/kernel/linux-4.7.nix
+++ b/pkgs/os-specific/linux/kernel/linux-4.8.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "4.7.6";
- extraMeta.branch = "4.7";
+ version = "4.8.5";
+ extraMeta.branch = "4.8";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
- sha256 = "1lidsc85xc025a46pyjimcr1xcwv7mh59jihmnqihfnwqch6albv";
+ sha256 = "0264h3b8h4bqgcif2jzbz4yzv290nrn444bhcqzb0lizj8a1f5s8";
};
kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-grsecurity.nix b/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
index f08d594a3957..eda2dd26163e 100644
--- a/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
+++ b/pkgs/os-specific/linux/kernel/linux-grsecurity.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "4.7.6";
+ version = "4.7.10";
extraMeta.branch = "4.7";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
- sha256 = "1lidsc85xc025a46pyjimcr1xcwv7mh59jihmnqihfnwqch6albv";
+ sha256 = "1p2r5d0jcrak9gxp0339g9z198x9laf09h08ck4jllhhaajrnicj";
};
kernelPatches = args.kernelPatches;
diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix
index 6b13b45d1ada..39bfbe76e6c7 100644
--- a/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
import ./generic.nix (args // rec {
- version = "4.8-rc6";
- modDirVersion = "4.8.0-rc6";
- extraMeta.branch = "4.8";
+ version = "4.9-rc3";
+ modDirVersion = "4.9.0-rc3";
+ extraMeta.branch = "4.9";
src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/testing/linux-${version}.tar.xz";
- sha256 = "122qn2r3q85xqcb56lgpkiv06yrd5w742fcdjk1sribqcvl1xlqr";
+ sha256 = "16dvjxh1i0s18mzm2bcj1v1drv7n2id39jgy71n7i5pyvzc5ffhj";
};
features.iwlwifi = true;
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix
index 0a577bb4e316..11f07f13345f 100644
--- a/pkgs/os-specific/linux/kernel/patches.nix
+++ b/pkgs/os-specific/linux/kernel/patches.nix
@@ -86,9 +86,9 @@ rec {
};
grsecurity_testing = grsecPatch
- { kver = "4.7.6";
- grrev = "201609301918";
- sha256 = "153x97vvd3jl2i7fs6d5ilqnmz2v2iyzsf3pg3frrackv6xaisa5";
+ { kver = "4.7.10";
+ grrev = "201610262029";
+ sha256 = "0bczfyb0zazccl9d8sxm4p34nayamyiv7c1hp272glcjjmvlb7cv";
};
# This patch relaxes grsec constraints on the location of usermode helpers,
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix
index 69a951875a53..9e5724984576 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf.nix
@@ -1,6 +1,6 @@
{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto
, docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkgconfig, libunwind, binutils
-, libiberty
+, libiberty, libaudit
, zlib, withGtk ? false, gtk2 ? null }:
with lib;
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
# perf refers both to newt and slang
# binutils is required for libbfd.
nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
- flex bison libiberty ];
+ flex bison libiberty libaudit ];
buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils zlib ] ++
stdenv.lib.optional withGtk gtk2;
diff --git a/pkgs/os-specific/linux/kmod/aggregator.nix b/pkgs/os-specific/linux/kmod/aggregator.nix
index 88069ba4bf13..9bd7c8480c1c 100644
--- a/pkgs/os-specific/linux/kmod/aggregator.nix
+++ b/pkgs/os-specific/linux/kmod/aggregator.nix
@@ -17,10 +17,12 @@ buildEnv {
echo "kernel version is $kernelVersion"
+ shopt -s extglob
+
# Regenerate the depmod map files. Be sure to pass an explicit
# kernel version number, otherwise depmod will use `uname -r'.
if test -w $out/lib/modules/$kernelVersion; then
- rm -f $out/lib/modules/$kernelVersion/modules.*
+ rm -f $out/lib/modules/$kernelVersion/modules.!(builtin*|order*)
${kmod}/bin/depmod -b $out -a $kernelVersion
fi
'';
diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix
index 1327a349474d..c7da0fcca2a9 100644
--- a/pkgs/os-specific/linux/libselinux/default.nix
+++ b/pkgs/os-specific/linux/libselinux/default.nix
@@ -19,7 +19,13 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig libsepol pcre ]
++ optionals enablePython [ swig python ];
- NIX_CFLAGS_COMPILE = "-fstack-protector-all -std=gnu89";
+ # Avoid this false warning:
+ # avc_internal.c: In function 'avc_netlink_receive':
+ # avc_internal.c:105:25: error: cast increases required alignment of target type [-Werror=cast-align]
+ # struct nlmsghdr *nlh = (struct nlmsghdr *)buf;
+ # ^
+
+ NIX_CFLAGS_COMPILE = "-std=gnu89 -Wno-error=cast-align";
# Unreleased upstream patch that fixes Python package issue arising
# from recent SWIG changes.
diff --git a/pkgs/os-specific/linux/libsepol/default.nix b/pkgs/os-specific/linux/libsepol/default.nix
index ecbb2a0ec464..3021ce20b46b 100644
--- a/pkgs/os-specific/linux/libsepol/default.nix
+++ b/pkgs/os-specific/linux/libsepol/default.nix
@@ -13,7 +13,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ flex ];
- NIX_CFLAGS_COMPILE = "-fstack-protector-all";
+ # Temporary work-around for problems after flex security update:
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835542
+ NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
preBuild = ''
makeFlagsArray+=("PREFIX=$out")
diff --git a/pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch b/pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch
deleted file mode 100644
index 8d1436c50940..000000000000
--- a/pkgs/os-specific/linux/nvidia-x11/365.35-kernel-4.7.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c
---- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:07:06.595038290 -0400
-+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:09:18.532197060 -0400
-@@ -114,7 +114,7 @@
- * We don't support any planar format, pick up first buffer only.
- */
-
-- gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
-+ gem = drm_gem_object_lookup(file, cmd->handles[0]);
-
- if (gem == NULL)
- {
-diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c
---- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:07:06.595038290 -0400
-+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:08:56.187492736 -0400
-@@ -408,7 +408,7 @@
-
- mutex_lock(&dev->struct_mutex);
-
-- gem = drm_gem_object_lookup(dev, file, handle);
-+ gem = drm_gem_object_lookup(file, handle);
-
- if (gem == NULL)
- {
-diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h
---- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:07:06.600038448 -0400
-+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:08:06.506926763 -0400
-@@ -554,12 +554,6 @@
- INIT_RADIX_TREE(tree, GFP_NOWAIT);
- }
-
--static bool radix_tree_empty(struct radix_tree_root *tree)
--{
-- void *dummy;
-- return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
--}
--
-
- #if !defined(NV_USLEEP_RANGE_PRESENT)
- static void __sched usleep_range(unsigned long min, unsigned long max)
diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix
index e7297b0efe20..229865b49a31 100644
--- a/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -12,15 +12,17 @@ assert (!libsOnly) -> kernel != null;
let
- versionNumber = "367.35";
+ versionNumber = "367.57";
# Policy: use the highest stable version as the default (on our master).
inherit (stdenv.lib) makeLibraryPath;
+ nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
+
in
stdenv.mkDerivation {
- name = "nvidia-x11-${versionNumber}${optionalString (!libsOnly) "-${kernel.version}"}";
+ name = "nvidia-x11-${versionNumber}${nameSuffix}";
builder = ./builder.sh;
@@ -28,12 +30,12 @@ stdenv.mkDerivation {
if stdenv.system == "i686-linux" then
fetchurl {
url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
- sha256 = "05g36bxcfk21ab8b0ay3zy21k5nd71468p9y1nbflx7ghpx25jrq";
+ sha256 = "1fw87nvbf8dmy7clwmm7jwp842c78mkz9bcb060wbihsywkfkm23";
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
- url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
- sha256 = "0m4k8f0212l63h22wk6hgi8fbfsgxqih5mizsw4ixqqmjd75av4a";
+ url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}.run";
+ sha256 = "0lc87bgr29l9idhy2a4bsplkwx9r0dz9kjhcc5xq2xqkkyr5sqd1";
}
else throw "nvidia-x11 does not support platform ${stdenv.system}";
@@ -55,7 +57,7 @@ stdenv.mkDerivation {
[ gtk2 atk pango glib gdk_pixbuf cairo ] );
programPath = makeLibraryPath [ xorg.libXv ];
- patches = if (!libsOnly) && (versionAtLeast kernel.dev.version "4.7") then [ ./365.35-kernel-4.7.patch ] else [];
+
buildInputs = [ perl nukeReferences ];
diff --git a/pkgs/os-specific/linux/powertop/default.nix b/pkgs/os-specific/linux/powertop/default.nix
index 59083a8b040e..4d81126af444 100644
--- a/pkgs/os-specific/linux/powertop/default.nix
+++ b/pkgs/os-specific/linux/powertop/default.nix
@@ -8,17 +8,19 @@ stdenv.mkDerivation rec {
sha256 = "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8";
};
- buildInputs = [ gettext libnl ncurses pciutils pkgconfig zlib ];
+ nativeBuildInputs = [ pkgconfig ];
+ buildInputs = [ gettext libnl ncurses pciutils zlib ];
postPatch = ''
substituteInPlace src/main.cpp --replace "/sbin/modprobe" "modprobe"
substituteInPlace src/calibrate/calibrate.cpp --replace "/usr/bin/xset" "xset"
'';
- meta = {
+ meta = with stdenv.lib; {
description = "Analyze power consumption on Intel-based laptops";
- license = stdenv.lib.licenses.gpl2;
- maintainers = [ stdenv.lib.maintainers.chaoflow ];
- platforms = stdenv.lib.platforms.linux;
+ homepage = https://01.org/powertop;
+ license = licenses.gpl2;
+ maintainers = with maintainers; [ chaoflow fpletz ];
+ platforms = platforms.linux;
};
}
diff --git a/pkgs/os-specific/linux/rtkit/default.nix b/pkgs/os-specific/linux/rtkit/default.nix
index fe392fb08410..dd6f9ec42afa 100644
--- a/pkgs/os-specific/linux/rtkit/default.nix
+++ b/pkgs/os-specific/linux/rtkit/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, fetchurl, pkgconfig, dbus, libcap }:
+{ stdenv, fetchurl, fetchpatch, pkgconfig, dbus, libcap }:
stdenv.mkDerivation rec {
name = "rtkit-0.11";
-
+
src = fetchurl {
url = "http://0pointer.de/public/${name}.tar.xz";
sha256 = "1l5cb1gp6wgpc9vq6sx021qs6zb0nxg3cn1ba00hjhgnrw4931b8";
@@ -12,6 +12,20 @@ stdenv.mkDerivation rec {
"--with-systemdsystemunitdir=$(out)/etc/systemd/system"
];
+ patches = [
+ # Drop removed ControlGroup stanza
+ (fetchpatch {
+ url = "http://git.0pointer.net/rtkit.git/patch/?id=6c28e20c0be2f616a025059fda0ffac84e7f4f17";
+ sha256 = "0lsxk5nv08i1wjb4xh20i5fcwg3x0qq0k4f8bc0r9cczph2sv7ck";
+ })
+
+ # security patch: Pass uid of caller to polkit
+ (fetchpatch {
+ url = "http://git.0pointer.net/rtkit.git/patch/?id=88d4082ef6caf6b071d749dca1c50e7edde914cc";
+ sha256 = "0hp1blbi359qz8fmr6nj4w9yc0jf3dd176f8pn25wdj38n13qkix";
+ })
+ ];
+
buildInputs = [ pkgconfig dbus libcap ];
meta = {
diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix
index 76858ab5e48e..1088e0befdfc 100644
--- a/pkgs/os-specific/linux/sysdig/default.nix
+++ b/pkgs/os-specific/linux/sysdig/default.nix
@@ -1,26 +1,19 @@
-{stdenv, fetchurl, fetchFromGitHub, cmake, luajit, kernel, zlib, ncurses, perl, jsoncpp, libb64, openssl, curl}:
+{stdenv, fetchurl, fetchFromGitHub, cmake, luajit, kernel, zlib, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc}:
let
inherit (stdenv.lib) optional optionalString;
baseName = "sysdig";
- version = "0.10.0";
- # sysdig-0.11.0 depends on some headers from jq which are not
- # installed by default.
- # Relevant sysdig issue: https://github.com/draios/sysdig/issues/626
- jq-prefix = fetchurl {
- url="https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz";
- sha256="0g29kyz4ykasdcrb0zmbrp2jqs9kv1wz9swx849i2d1ncknbzln4";
- };
+ version = "0.12.0";
in
stdenv.mkDerivation {
name = "${baseName}-${version}";
src = fetchurl {
url = "https://github.com/draios/sysdig/archive/${version}.tar.gz";
- sha256 = "0hs0r9z9j7padqdcj69bwx52iw6gvdl0w322qwivpv12j3prcpsj";
+ sha256 = "17nf2h5ajy333rwh91hzaw8zq2mnkb3lxy8fmbbs8qazgsvwz6c3";
};
buildInputs = [
- cmake zlib luajit ncurses perl jsoncpp libb64 openssl curl
+ cmake zlib luajit ncurses perl jsoncpp libb64 openssl curl jq gcc
];
hardeningDisable = [ "pic" ];
@@ -31,7 +24,6 @@ stdenv.mkDerivation {
cmakeFlags = [
"-DUSE_BUNDLED_DEPS=OFF"
- "-DUSE_BUNDLED_JQ=ON"
"-DSYSDIG_VERSION=${version}"
] ++ optional (kernel == null) "-DBUILD_DRIVER=OFF";
@@ -41,12 +33,23 @@ stdenv.mkDerivation {
export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
'';
- preBuild = ''
- mkdir -p jq-prefix/src
- cp ${jq-prefix} jq-prefix/src/jq-1.5.tar.gz
- '';
+ libPath = stdenv.lib.makeLibraryPath [
+ zlib
+ luajit
+ ncurses
+ jsoncpp
+ curl
+ jq
+ openssl
+ libb64
+ gcc
+ stdenv.cc.cc
+ ];
- postInstall = optionalString (kernel != null) ''
+ postInstall = ''
+ patchelf --set-rpath "$libPath" "$out/bin/sysdig"
+ patchelf --set-rpath "$libPath" "$out/bin/csysdig"
+ '' + optionalString (kernel != null) ''
make install_driver
kernel_dev=${kernel.dev}
kernel_dev=''${kernel_dev#/nix/store/}
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
index b777042d6011..f84611139033 100644
--- a/pkgs/os-specific/linux/util-linux/default.nix
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkgconfig, zlib, ncurses ? null, perl ? null, pam, systemd, minimal ? false }:
+{ lib, stdenv, fetchurl, pkgconfig, zlib, libseccomp, fetchpatch, autoreconfHook, ncurses ? null, perl ? null, pam, systemd, minimal ? false }:
stdenv.mkDerivation rec {
name = "util-linux-${version}";
@@ -14,7 +14,11 @@ stdenv.mkDerivation rec {
patches = [
./rtcwake-search-PATH-for-shutdown.patch
- ];
+ (fetchpatch {
+ name = "CVE-2016-2779.diff";
+ url = https://github.com/karelzak/util-linux/commit/8e4925016875c6a4f2ab4f833ba66f0fc57396a2.patch;
+ sha256 = "0kmigkq4s1b1ijrq8vcg2a5cw4qnm065m7cb1jn1q1f4x99ycy60";
+ })];
outputs = [ "bin" "dev" "out" "man" ];
@@ -50,9 +54,11 @@ stdenv.mkDerivation rec {
makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
- nativeBuildInputs = [ pkgconfig ];
+ # autoreconfHook is required for CVE-2016-2779
+ nativeBuildInputs = [ pkgconfig autoreconfHook ];
+ # libseccomp is required for CVE-2016-2779
buildInputs =
- [ zlib pam ]
+ [ zlib pam libseccomp ]
++ lib.optional (ncurses != null) ncurses
++ lib.optional (systemd != null) systemd
++ lib.optional (perl != null) perl;
diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix
index a885d40658b9..14974f6d43fc 100644
--- a/pkgs/os-specific/linux/wireguard/default.nix
+++ b/pkgs/os-specific/linux/wireguard/default.nix
@@ -8,11 +8,11 @@ assert kernel != null -> !(kernel.features.grsecurity or false);
let
name = "wireguard-unstable-${version}";
- version = "2016-08-08";
+ version = "2016-10-25";
src = fetchurl {
- url = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-experimental-0.0.20160808.tar.xz";
- sha256 = "0z9s9xi8dzkmjnki7ialf2haxb0mn2x5676sjwmjij1jfi9ypxhw";
+ url = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-experimental-0.0.20161025.tar.xz";
+ sha256 = "09rhap3dzb8rcq1a1af9inf1qz7161yghafbgpbnd9dg016vhgs3";
};
meta = with stdenv.lib; {
diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix
index a3e9e930f5ea..fe0d2ca28f99 100644
--- a/pkgs/os-specific/linux/wpa_supplicant/default.nix
+++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix
@@ -4,13 +4,13 @@
with stdenv.lib;
stdenv.mkDerivation rec {
- version = "2.5";
+ version = "2.6";
name = "wpa_supplicant-${version}";
src = fetchurl {
url = "http://hostap.epitest.fi/releases/${name}.tar.gz";
- sha256 = "05mkp5bx1c3z7h5biddsv0p49gkrq9ksany3anp4wdiv92p5prfc";
+ sha256 = "0l0l5gz3d5j9bqjsbjlfcv4w4jwndllp9fmyai4x9kg6qhs6v4xl";
};
# TODO: Patch epoll so that the dbus actually responds
@@ -79,7 +79,6 @@ stdenv.mkDerivation rec {
patches = [
./build-fix.patch
- ./libressl.patch
];
postInstall = ''
diff --git a/pkgs/os-specific/linux/wpa_supplicant/gui.nix b/pkgs/os-specific/linux/wpa_supplicant/gui.nix
index a75367f0bb0c..89f40589c870 100644
--- a/pkgs/os-specific/linux/wpa_supplicant/gui.nix
+++ b/pkgs/os-specific/linux/wpa_supplicant/gui.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, qt4, qmake4Hook, inkscape, wpa_supplicant }:
+{ stdenv, fetchurl, qt4, qmake4Hook, imagemagick, wpa_supplicant }:
stdenv.mkDerivation {
name = "wpa_gui-${wpa_supplicant.version}";
@@ -6,33 +6,29 @@ stdenv.mkDerivation {
inherit (wpa_supplicant) src;
buildInputs = [ qt4 ];
+ nativeBuildInputs = [ qmake4Hook imagemagick ];
- nativeBuildInputs = [ inkscape qmake4Hook ];
+ patches = [ ./remove_inkscape.patch ];
+ prePatch = ''
+ cd wpa_supplicant/wpa_gui-qt4
+ '';
- prePatch = "cd wpa_supplicant/wpa_gui-qt4";
+ preConfigure = ''
+ lrelease wpa_gui.pro
+ '';
- preConfigure =
- ''
- lrelease wpa_gui.pro
- '';
+ postBuild = ''
+ make -C icons
+ '';
- # We do not install .xpm icons. First of all, I don't know where they should
- # be install. Second, this allows us to drop imagemagick build-time dependency.
- postBuild =
- ''
- sed -e '/ICONS.*xpm/d' -i icons/Makefile
- make -C icons
- '';
-
- installPhase =
- ''
- mkdir -pv $out/bin
- cp -v wpa_gui $out/bin
- mkdir -pv $out/share/applications
- cp -v wpa_gui.desktop $out/share/applications
- mkdir -pv $out/share/icons
- cp -av icons/hicolor $out/share/icons
- '';
+ installPhase = ''
+ mkdir -pv $out/bin
+ cp -v wpa_gui $out/bin
+ mkdir -pv $out/share/applications
+ cp -v wpa_gui.desktop $out/share/applications
+ mkdir -pv $out/share/icons
+ cp -av icons/hicolor $out/share/icons
+ '';
meta = {
description = "Qt-based GUI for wpa_supplicant";
diff --git a/pkgs/os-specific/linux/wpa_supplicant/libressl.patch b/pkgs/os-specific/linux/wpa_supplicant/libressl.patch
deleted file mode 100644
index 0de3810daccd..000000000000
--- a/pkgs/os-specific/linux/wpa_supplicant/libressl.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-$OpenBSD: patch-src_crypto_tls_openssl_c,v 1.3 2015/09/29 11:57:54 dcoppa Exp $
-
-Compatibility fixes for LibreSSL
-
---- a/src/crypto/tls_openssl.c Sun Sep 27 21:02:05 2015
-+++ b/src/crypto/tls_openssl.c Mon Sep 28 13:43:46 2015
-@@ -2229,7 +2229,7 @@ static int tls_parse_pkcs12(struct tls_data *data, SSL
- }
-
- if (certs) {
--#if OPENSSL_VERSION_NUMBER >= 0x10002000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
- SSL_clear_chain_certs(ssl);
- while ((cert = sk_X509_pop(certs)) != NULL) {
- X509_NAME_oneline(X509_get_subject_name(cert), buf,
-@@ -2247,7 +2247,7 @@ static int tls_parse_pkcs12(struct tls_data *data, SSL
- /* Try to continue anyway */
- }
- sk_X509_free(certs);
--#ifndef OPENSSL_IS_BORINGSSL
-+#if !defined(OPENSSL_IS_BORINGSSL) && !defined(LIBRESSL_VERSION_NUMBER)
- res = SSL_build_cert_chain(ssl,
- SSL_BUILD_CHAIN_FLAG_CHECK |
- SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR);
-@@ -2812,7 +2812,7 @@ int tls_connection_get_random(void *ssl_ctx, struct tl
- if (conn == NULL || keys == NULL)
- return -1;
- ssl = conn->ssl;
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL)
- return -1;
-
-@@ -2841,7 +2841,7 @@ int tls_connection_get_random(void *ssl_ctx, struct tl
- #ifndef CONFIG_FIPS
- static int openssl_get_keyblock_size(SSL *ssl)
- {
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- const EVP_CIPHER *c;
- const EVP_MD *h;
- int md_size;
-@@ -2911,7 +2911,7 @@ static int openssl_tls_prf(struct tls_connection *conn
- "mode");
- return -1;
- #else /* CONFIG_FIPS */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- SSL *ssl;
- u8 *rnd;
- int ret = -1;
-@@ -3394,7 +3394,7 @@ int tls_connection_set_cipher_list(void *tls_ctx, stru
-
- wpa_printf(MSG_DEBUG, "OpenSSL: cipher suites: %s", buf + 1);
-
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
- #if defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || defined(EAP_SERVER_FAST)
- if (os_strstr(buf, ":ADH-")) {
- /*
-@@ -3977,7 +3977,7 @@ static int tls_sess_sec_cb(SSL *s, void *secret, int *
- struct tls_connection *conn = arg;
- int ret;
-
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- if (conn == NULL || conn->session_ticket_cb == NULL)
- return 0;
-
diff --git a/pkgs/os-specific/linux/wpa_supplicant/remove_inkscape.patch b/pkgs/os-specific/linux/wpa_supplicant/remove_inkscape.patch
new file mode 100644
index 000000000000..1bdb164e24f5
--- /dev/null
+++ b/pkgs/os-specific/linux/wpa_supplicant/remove_inkscape.patch
@@ -0,0 +1,30 @@
+From 7a42ef048b420f9b939085ea8c6af6deb9c19dac Mon Sep 17 00:00:00 2001
+From: Moritz Ulrich <moritz@tarn-vedra.de>
+Date: Sun, 30 Oct 2016 22:17:54 +0100
+Subject: [PATCH] Foo
+
+---
+ icons/Makefile | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/icons/Makefile b/icons/Makefile
+index 709514c..9a5fa94 100644
+--- a/icons/Makefile
++++ b/icons/Makefile
+@@ -9,10 +9,9 @@ all: $(ICONS)
+
+ %.png:
+ mkdir -p hicolor/$(word 1, $(subst /, ,$(@)))/apps/
+- inkscape $(subst .png,.svg, $(word 2, $(subst /, , $(@)))) --without-gui \
+- --export-width=$(word 1, $(subst x, , $(@))) \
+- --export-height=$(word 2, $(subst x, , $(subst /, , $(@)))) \
+- --export-png=hicolor/$(word 1, $(subst /, ,$(@)))/apps/$(word 2, $(subst /, , $@))
++ convert $(subst .png,.svg, $(word 2, $(subst /, , $(@)))) \
++ -size $(word 1, $(subst x, , $(@)))x$(word 2, $(subst x, , $(subst /, , $(@)))) \
++ hicolor/$(word 1, $(subst /, ,$(@)))/apps/$(word 2, $(subst /, , $@))
+
+ %.xpm:
+ mkdir -p pixmaps/
+--
+2.10.1
+