Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dtc: 1.7.0 -> 1.7.1 #345465

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 2 additions & 55 deletions pkgs/development/compilers/dtc/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ stdenv
, lib
, fetchzip
, fetchpatch
, meson
, ninja
, flex
Expand All @@ -16,59 +15,13 @@

stdenv.mkDerivation (finalAttrs: {
pname = "dtc";
version = "1.7.0";
version = "1.7.1";

src = fetchzip {
url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/dtc-v${finalAttrs.version}.tar.gz";
sha256 = "sha256-FMh3VvlY3fUK8fbd0M+aCmlUrmG9YegiOOQ7MOByffc=";
hash = "sha256-Zl2bOGDJIe/bhMFNsy969JYCYqtXTOzgb+bbOlKqOco=";
};

# Big pile of backports.
# FIXME: remove all of these after next upstream release.
patches = let
fetchUpstreamPatch = { rev, hash }: fetchpatch {
name = "dtc-${rev}.patch";
url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=${rev}";
inherit hash;
};
in [
# meson: Fix cell overflow tests when running from meson
(fetchUpstreamPatch {
rev = "32174a66efa4ad19fc6a2a6422e4af2ae4f055cb";
hash = "sha256-C7OzwY0zq+2CV3SB5unI7Ill2M3deF7FXeQE3B/Kx2s=";
})

# Use #ifdef NO_VALGRIND
(fetchUpstreamPatch {
rev = "41821821101ad8a9f83746b96b163e5bcbdbe804";
hash = "sha256-7QEFDtap2DWbUGqtyT/RgJZJFldKB8oSubKiCtLZ0w4=";
})

# dtc: Fix linker options so it also works in Darwin
(fetchUpstreamPatch {
rev = "71a8b8ef0adf01af4c78c739e04533a35c1dc89c";
hash = "sha256-uLXL0Sjcn+bnMuF+A6PjUW1Rq6uNg1dQl58zbeYpP/U=";
})

# meson: allow disabling tests
(fetchUpstreamPatch {
rev = "bdc5c8793a13abb8846d115b7923df87605d05bd";
hash = "sha256-cO4f/jJX/pQL7kk4jpKUhsCVESW2ZuWaTr7z3BuvVkw=";
})

# meson: fix installation with meson-python
(fetchUpstreamPatch {
rev = "3fbfdd08afd2a7a25b27433f6f5678c0fe694721";
hash = "sha256-skK8m1s4xkK6x9AqzxiEK+1uMEmS27dBI1CdEXNFTfU=";
})

# pylibfdt: fix get_mem_rsv for newer Python versions
(fetchUpstreamPatch {
rev = "822123856980f84562406cc7bd1d4d6c2b8bc184";
hash = "sha256-IJpRgP3pP8Eewx2PNKxhXZdsnomz2AR6oOsun50qAms=";
})
];

env.SETUPTOOLS_SCM_PRETEND_VERSION = finalAttrs.version;

nativeBuildInputs = [
Expand All @@ -88,12 +41,6 @@ stdenv.mkDerivation (finalAttrs: {

postPatch = ''
patchShebangs setup.py

# meson.build: bump version to 1.7.0
substituteInPlace libfdt/meson.build \
--replace "version: '1.6.0'," "version: '${finalAttrs.version}',"
substituteInPlace meson.build \
--replace "version: '1.6.0'," "version: '${finalAttrs.version}',"
'';

# Required for installation of Python library and is innocuous otherwise.
Expand Down