2023-11-16 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libiconv }:
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-03-15 16:39:30 +00:00
|
|
|
pname = "readstat";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "1.1.9";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WizardMac";
|
|
|
|
repo = "ReadStat";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-4lRJgZPB2gfaQ9fQKvDDpGhy1eDNT/nT1QmeZlCmCis=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/WizardMac/ReadStat/commit/211c342a1cfe46fb7fb984730dd7a29ff4752f35.patch";
|
|
|
|
hash = "sha256-nkaEgusylVu7NtzSzBklBuOnqO9qJPovf0qn9tTE6ls=";
|
|
|
|
})
|
2024-01-25 14:12:00 +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-16 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = [ libiconv ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2022-10-30 15:09:59 +00:00
|
|
|
|
2022-10-06 18:32:54 +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-16 04:20:00 +00:00
|
|
|
platforms = lib.platforms.all;
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
}
|