2023-11-07 01:07:06 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libiconv }:
|
2022-09-21 17:21:13 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-01-28 04:20:00 +00:00
|
|
|
pname = "readstat";
|
2023-02-25 06:18:17 +00:00
|
|
|
version = "1.1.9";
|
2022-09-21 17:21:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WizardMac";
|
|
|
|
repo = "ReadStat";
|
|
|
|
rev = "v${version}";
|
2023-02-25 06:18:17 +00:00
|
|
|
sha256 = "sha256-4lRJgZPB2gfaQ9fQKvDDpGhy1eDNT/nT1QmeZlCmCis=";
|
2022-09-21 17:21:13 +00:00
|
|
|
};
|
|
|
|
|
2023-11-07 01:07:06 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/WizardMac/ReadStat/commit/211c342a1cfe46fb7fb984730dd7a29ff4752f35.patch";
|
|
|
|
hash = "sha256-nkaEgusylVu7NtzSzBklBuOnqO9qJPovf0qn9tTE6ls=";
|
|
|
|
})
|
2024-01-13 18:52:18 +00:00
|
|
|
|
|
|
|
# Backport use-after-free:
|
|
|
|
# https://github.com/WizardMac/ReadStat/pull/298
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/WizardMac/ReadStat/commit/718d49155e327471ed9bf4a8c157f849f285b46c.patch";
|
|
|
|
hash = "sha256-9hmuFa05b4JlxSzquIxXArOGhbi27A+3y5gH1IDg+R0=";
|
|
|
|
})
|
2023-11-07 01:07:06 +00:00
|
|
|
];
|
|
|
|
|
2022-09-21 17:21:13 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
|
|
|
|
2023-01-17 20:11:43 +00:00
|
|
|
buildInputs = [ libiconv ];
|
2022-10-21 18:18:30 +00:00
|
|
|
|
2023-01-17 20:12:15 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2022-09-21 17:21:13 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/WizardMac/ReadStat";
|
|
|
|
description = "Command-line tool (+ C library) for converting SAS, Stata, and SPSS files";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ swflint ];
|
2023-11-07 01:07:06 +00:00
|
|
|
platforms = lib.platforms.all;
|
2022-09-21 17:21:13 +00:00
|
|
|
};
|
|
|
|
}
|